Opened 9 years ago

Closed 9 years ago

#2225 closed enhancement (fixed)

sliderule should support more scales and combinations

Reported by: walter Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sliderule Version: Unspecified
Severity: Unspecified Keywords: sliderule
Cc: tonyforster Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Tony Forster suggests:

maybe the deeper thinking is in the pairings of the scales

for example, L is more interesting paired with D (log10)
what is L and A? (log100 ?)
S and A? (10*sin)2 ?
S and T (artan(sin)) ?
what do LL1 LL2 and LL3 do?

so rather than giving fixed pairings, select 2 scales from a menu and only say what the result is for the more common pairings?

on current displays
A eg. 2+2=4 is equally 4-2=2
C eg. 1.5x2=3 is equally 3/2=1.5
CI eg. 1.2/4=0.3 is equally 3x4=12
maybe both formulae should be displayed with 'or'?

ps when changing the scales, the displayed formula and labels only change if you then move something, should change on changed scale

(I am thinking that maybe we have all the rules on the screen, at the bottom, and you drag the ones you want to use up to the top. Buttons would be used to vary the formulae. - walter)

Attachments (6)

slideruletute.doc (153.0 KB) - added by tonyforster 9 years ago.
Tutorial
Sliderule-14.xo (85.7 KB) - added by walter 9 years ago.
now with keyboard input (arrow keys)
LL0.svg (57.8 KB) - added by walter 9 years ago.
the LL0 scale (for loglog)
sliderule-reverseslider.jpg (312.1 KB) - added by tonyforster 9 years ago.
For reference, sliderule showing reverse slider L LL1 LL2 LL3
Sliderule-15.xo (107.5 KB) - added by walter 9 years ago.
log log and ln scales... beginning of major refactoring of code
Sliderule-19.xo (44.3 KB) - added by walter 9 years ago.
major refactoring to make end-user modifications more direct

Download all attachments as: .zip

Change History (35)

comment:1 Changed 9 years ago by tonyforster

Results for L scale are inconsistent with other scales (confusing but not wrong, just shows there are many ways of representing the result)
For C scale it's bottom scale +top scale =result at cursor or bottom scale at cursor minus top scale = result
thats how I would expect to use it
For L its top scale plus bottom scale =result at cursor or bottom scale at cursor minus bottom LHS =result at cursor

comment:2 Changed 9 years ago by tonyforster

  • Cc tonyforster added

comment:3 Changed 9 years ago by walter

I've pushed a patch for the L scale to git. Still want to think about how to add more scale combinations. Maybe it is time to add a third scale to the display? Not sure.

comment:4 Changed 9 years ago by tonyforster

Maybe keep existing layouts, C,CI,A,L but add custom layout where you can chose any 2 scales from a list and there is no result text? Add S,T,LL1,LL2,LL3,K,P scales to this list.
Add markers for pi and e. (my sliderule only marks pi but I cant see the harm in marking e)
Move the L scale to the left of the toolbar so you start with addition and move progressively up to complexity.
This activity would benefit from a tute or lesson plan, starting with instruction and moving into challenges.

comment:5 Changed 9 years ago by walter

v13 has K, S, and T. I moved the results display off the toolbar in anticipation of using combo boxes for the top and bottom scales instead of buttons. But that will have to wait until v14.

comment:6 Changed 9 years ago by walter

Tony, please give me feedback on the experimental v14 attached to this ticket.

comment:7 Changed 9 years ago by walter

  • Component changed from untriaged to Sliderule

comment:8 Changed 9 years ago by tonyforster

inverse CI normally pairs with D, CI is the movable scale and D the fixed

comment:9 Changed 9 years ago by tonyforster

Dropdown lists initially show up/down arrows, when you scroll to top they disappear, though the full list is there, it confused me for a while.

There are limited choices for the first and second scales, eg I can't pair S and A to demonstrate sin(45)2=0.5

comment:10 Changed 9 years ago by tonyforster

Custom pairings should be sliding rather than fixed at least as in physical sliderules (and I have 2 sliderules one puts S and T fixed and the other on the slider so maybe all pairs should slide?)
For example S and CI are fixed so I cant do sin(45)x2=1.414

comment:11 follow-up: Changed 9 years ago by walter

So what if I make every combo available top and bottom and make every top slider move by itself and the bottom slider always move both?

And I'll add a button to the toolbar to realign the sliders.

I'll still only show the results of the calculation for a few preset functions, but I can expand the current list.

comment:12 in reply to: ↑ 11 Changed 9 years ago by tonyforster

Replying to walter:

So what if I make every combo available top and bottom and make every top slider move by itself and the bottom slider always move both?

yes,good

And I'll add a button to the toolbar to realign the sliders.

Dont understand, i'll wait for the next version

comment:13 Changed 9 years ago by tonyforster

Left and right arrow keys could nudge the last selected (slider or cursor) by one significant digit, its tricky with the mouse

Changed 9 years ago by tonyforster

Tutorial

comment:14 Changed 9 years ago by walter

I haven't added the arrow-key functionality yet, but the new version covers most of the other issues raised in this ticket. Please give it a test run.

Changed 9 years ago by walter

now with keyboard input (arrow keys)

comment:15 Changed 9 years ago by walter

Arrow keys joggle sliders,
letter keys (c, a, t, s, k, i, l) bring up slides
Backspace realigns sliders

comment:16 Changed 9 years ago by tonyforster

CI scale is slightly misaligned, shows on backspace, aprox 9.95 =10

on backspace realign both scales to left and cursor too?

comment:17 Changed 9 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed

v14 addresses the issues raised in this ticket

comment:18 Changed 9 years ago by tonyforster

Ln scale is called log log in v15. this is confusing because its linear, just like the linear scale. Yes, on my sliderule its called LL , I dont know why.
(Further confusing is that you read logs off the L scale that we call linear.)

Suggest it keep its LLn abbreviation but be renamed on the dropdown list to ... um ..., maybe something linear with reference to natural or e ...
possibilities:
LLn
Linear e
Linear n
Lin e
Lin n
Lin nat

comment:19 Changed 9 years ago by tonyforster

comment:20 Changed 9 years ago by tonyforster

Think I have worked out
new scale is Ln not LL, its Ln(D)
but
L is Log10(Ln(LL3))
or LL3 = e(10L)

comment:21 Changed 9 years ago by tonyforster

  • Resolution fixed deleted
  • Status changed from closed to reopened

Changed 9 years ago by walter

the LL0 scale (for loglog)

comment:22 Changed 9 years ago by walter

I am refactoring how I generate the scales with the goal in mind to let the user type in their own functions to define new scales. In the meantime, does the LL0 scale attached seem correct to you?

comment:23 Changed 9 years ago by walter

re user-defined slides, for example, the C slide would be defined simply as:

def offset_function(x):

return math.log(x, 10)

def label_function(x):

return x

The LL0 slider is similar:

def offset_function(x):

return math.log(x, 10)

def label_function(x):

return math.exp(x / 1000)

The trick will be to do the proper scaling along the axis and printing a useful precision for the labels.

comment:24 Changed 9 years ago by walter

Following the make-your-own slide progress in a new ticket (#2310)

comment:25 Changed 9 years ago by tonyforster

Yes, LL0.svg seems right. (I don't have a LL0 on my sliderule just LL1 LL2 LL3) but it seems right according to http://www.sliderule.ca/scales.htm
where LL0=e0.001*C

Changed 9 years ago by tonyforster

For reference, sliderule showing reverse slider L LL1 LL2 LL3

Changed 9 years ago by walter

log log and ln scales... beginning of major refactoring of code

comment:26 Changed 9 years ago by walter

I think v15 is a bit more predictable re the log log and ln sliders... Also, I am preparing for being able to generate custom slides on the fly as per #2310.

comment:27 Changed 9 years ago by tonyforster

just a comment, LL0 is not a very interesting scale, less interesting than LL1 LL2 LL3
because n+1=en for small n
in other words it looks like C relabeled

Changed 9 years ago by walter

major refactoring to make end-user modifications more direct

comment:28 Changed 9 years ago by walter

I reworked the internals of the code to make it possible to add new slides through very straight-forward modification of some tables. I'll be curious if anyone tries to add additional slides.

See v19 attached to this ticket.

comment:29 Changed 9 years ago by walter

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.