Elastica script

 From:  bemfarmer
7001.11 
The Elastica2 script works well in 3D, Top, Front, and Right views, when the selected point has the 3rd coordinate = 0. (z=0 in Top View, or 3D View)
In 3D View, when z is non-zero, the first Mirror is OK. The second Mirror (and Rotate?), go off at strange angles.

The first quarter of the final curve is created with a cplane, from multiple x and y, with z = 0, points, then evaluated to world coordinates.

The first mirror of the curve seems to work fine, because it uses the same cplane:
code:
 var mirror1 = factory( 'mirror', curve, cplane, cplane.evaluate( 0.0, 1.0, 0.0 ) );


The problem is that the second Mirror is using World coordinates, instead of cplane coordinates.

It is confusing...

I need to create cplane2, located at end point, given in World coordinates, of the first quarter curve, in the current View, the same View as the original cplane, in order to do mirror2 and rotate...
But the view could be in any of the 4 views.

Michaels recent post of code:
moi.view.setCPlane( Frame, ApplyToAllViews, OrientOrthoViews ); - takes a required coordinate frame parameter, optional boolean parameter for whether to apply to all views or 3d view only, and optional boolean parameter for whether to orient ortho views or keep them in world.

- Brian