Biconcave script
All  1-6  7-9

Previous
Next
 From:  bemfarmer
6718.7 
The script "_Biconcave03," now has a "Bulge" slider which acts on the Y height of the curve.
It applies an exponent, like squared or cubed, etc. to a portion of the equation for the Y coordinate.
The exponent slider has a minimum of .5, and a maximum of 4.
(The height for a high modulus value, to the power 4 is extremely large.)
Other exponent values can be keyed in.

A negative exponent value tends to yield a "slender" curve.

The original source paper had provisions for squared and cubed exponents.

This slider is not continuous, but it does not blink like the clothoid slider does.
Is it because the slider is shorter?
I'll have to practice some more:-)

Note that the code is still in the .js file, and is fairly fast, so placing code in the .htm file has not been resorted to, at this time.

- Brian

EDITED: 23 May 2014 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
6718.8 In reply to 6718.7 
In the .htm for the slider, I failed to include the line:

onmousemovevaluechange="moi.ui.fireUIEvent(id);"

Including this code results in the "bulge" of the curve trying to respond to the mouse movement in a continuous way,
but apparently each (pixel change?) causes recalculation, so the curve flickers for dozens of times, due to relatively slow (?) javascript.

I'll try putting some of the calculations in the .htm file.

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  bemfarmer
6718.9 In reply to 6718.8 
The Update() function, and the functions it calls, were moved to .htm.
Finally, this resulted in the slider working "continuously with movement," and the "flicker" only lasts for about 1/2 second.

Three problems were encountered with using script in .htm.
1. The range checks for mValue, and/or alert messages, did not work in .htm. (Why?)
So the range checks, and alert function were move back to .js, and Update() was changed to Update(mValue).
(Maybe range check could be moved to a subroutine.)

2. Using abbreviations like var ui = moi.ui seems not to work. (Why?)

3. Calling a function, like "var pt = EvalJacobi( tval, mValue, U, cHeight, Lradius, exponent );"
and then substituting m for mValue, like "EvalJacobi( tval, m, U, cHeight, Lradius, exponent ) {... ...} does not work. (Why?)

The new version of Biconcave script is .04.

Due to the "less forgiving" .htm code, please report any hangups. :-)

- Brian

EDITED: 25 May 2014 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-6  7-9