Elastica script
 1-19  20-23

Previous
Next
 From:  bemfarmer
7001.20 In reply to 7001.19 
Thank you Michael.

Your help, and Cross product information makes sense.

I'll be doing some corrections to the elastica2 script over the next few days, as work and energy level allows :-)

- 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
Next
 From:  bemfarmer
7001.21 
The string name of the current Viewport, in which a point was just picked.
Result is one of ( 3D, Top, Bottom, Front, Back, Right, Left )

code fragment in _Elastica2Test script.

code:
	var pointpicker = moi.ui.createPointPicker();
	if ( !GetPoint( pointpicker ) ) return;
	moi.ui.commandUI.cplane = pointpicker.ptframe;
	moi.ui.commandUI.referencePt = pointpicker.pt;

	var vpName = moi.ui.getActiveViewport().name;

	moi.ui.alert( 'viewportName = ' + vpName ); 


- 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
Next
 From:  bemfarmer
7001.22 
_Elastica3Aug5_OK_Draft is a pretty good version of _Elastica3 script.
It is not finished.
Should add rudimentary extrude (?), using Max S techniques, if this is possible.
Should add Help File, or else Help PDF.

Crucial help from Michael enabled the creation of the cPlane2 frame, for rotation and mirror2.
The user selects a reference point in one of the 7 MoI viewport Views, and the resulting 2D Elastica curve appears.
Looking at this curve in another View looks as expected, a Top or Front, or Right appearance, etc.

Running the script again, and selecting another point in any other of the 7 Views, with the same shape parameter,
produces an Elastica curve with the same appearance as the first selection in the other view.
This is due to using cPlane1 frame from pointpicker.

The Script has nearly all of the code in the .js file, not in .htm file.

Said goodbye to DarkGoldenRod color, for the pushButtons.
The DarkGoldenRod color for pushButton text was Okay, but the look of the theme text color for Default and Dark Themes is a bit better.
The pushButtons show elastica curve for 7 values of shape parameter.
The shape slider produces a near continuous progression of shapes.

The script works in MoI3 (slight delay), and also in MoI4, and MoI5beta.

I believe that the bugs of _Elastica2 are gone.

Number of points should be relatively high.
A trial of a Control point curve had a poor look between the two joined halves, so InterpCurve was used instead.

One curiosity is that the intersection of the "figure 8" elastica, when zoomed way way in, appears offset from the reference picked point.
But the distance of the offset from the reference point shows up as 000000.
Earlier trials had the join(s) eliminating the visual offset, but that is no longer happening, with the current join order.
The value of shape = 0.65223 was calculated in the source paper, and is not exact.

- Brian

EDITED: 5 Aug 2022 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
 From:  bemfarmer
7001.23 In reply to 7001.22 
After doing some testing, I have come to the conclusion that the MoI Rebuild command (refit mode) does not work for the figure 8 elastica, a closed curve.
(Tested in MoI4, and MoI5beta.)
The Rebuild, # Points option worked.
Rebuild works for an open, almost figure 8 curve.
Is this a "bug" in Rebuild, or a result of the closed geometry of the figure 8? Tolerance calculation?


In other discoveries, a point count of 2 tends to make a zig zag curve.
A point count of 3 makes some different curves.
A point count of only 10 makes some fairly decent curves.

Added a help window, and cleaned up the .htm file a bit. (q.v.)

Now to tackle the rudimentary extrusion...

Name: ...Aug6Draft
- Brian

EDITED: 6 Aug 2022 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:  1-19  20-23