Scripting BLEND
All  1-8  9-13

Previous
Next
 From:  Michael Gibson
6955.9 In reply to 6955.8 
Hi Brian, I'll take a look into it a bit later on today here.

- Michael
  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
6955.10 In reply to 6955.9 
Thanks Michael

I'm looking into the trig/algebra.
Tangents seem to be matching up so far.

- 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:  Michael Gibson
6955.11 In reply to 6955.8 
Hi Brian, try the attached version in place of the last .htm file you posted above.

Basically once you have grabbed out the orientation list and changed the one flip value in it, then you want to re-use that same orientation list that was just modified rather than trying to build a completely new one. You can't build a new one right now because scripts don't have any way to create an IMoiCurveOrientation object so you have to re-use the one that was grabbed out from the factory.

Check a diff utility to see the changes but basically don't do this:

code:
				// TRY to make a new orientations list with the name orientlist.
				var orientlist = concat(orient1.flipped, seamvalue1.seam, orient2.flipped, seamvalue2.seam ); 


That will make a list but it won't contain IMoiCurveOrientation objects in it, it will be a list with 4 items in the list: boolean, double, boolean, double. It resembles the orientation list, but the what the orientation list is here is a list of 2 CurveOrientation objects with each of those objects having 2 properties. Yes both of these constructs have 4 properties total in it, but the system is expecting CurveOrientation objects in this case and so just individual properties in the list without them actually belonging to a CurveOrientation object won't do the trick here.


So then when you do the blend, just use the orientlist that was sucked out from the factory previously like this:

code:
              var blendCurve = factory( 'blend', curvelist, orientlist , 'G3', 1.18 );



Hope this helps!

Sorry this stuff is so tricky currently, in V4 I'll be trying to make a lot more direct methods for constructing various things rather than only being able to do all creation stuff through the generic factory mechanism.

- Michael
Attachments:

  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
6955.12 In reply to 6955.11 
Thank you very much Michael.

The BLEND now works for the center, 99% of the time. The exceptions are for 2 arms, and exponent less than 0.17, and 3 or 4 arms with
exponent even less, so I made the slider minimum for exponent to be 0.17. Lower values could still be manually entered.

Surprisingly, doing !orient#.flipped to both the curves resulted in the Tail Ends of both spirals to be blended. So it was not necessary to do !orient1.flipped
or !orient.flipped. But the second Blend does need the orientations "list".

On another note, I was occasionally able to crash Moi by trying to enter an exponent number, but failing to enter any numbers, and entering blank numbers.

Using a beautiful Moi PDF of some circular arrayed spirals, I was able to do the Math to compute the Polygon radius, for the center of circular array.
polyRadius = (Math.exp(expo * stopangle2) + Math.exp(expo * stopangle1)) / ( 2 * Math.sin( Math.PI/N.value )); Where N.value is the number of tentacles.

The "final" script does not have manual G# continuity entry, nor Bulge slider.

The spirals join without any difference in the tangents, based upon a few trials.

Default exponent is for a Golden ratio. Clicking on some commands restores to default values.

- Brian




See next post for October3_2014 version.

EDITED: 5 Oct 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
 From:  bemfarmer
6955.13 In reply to 6955.12 
Here is the October 3, 2014 "Final Final" LogSkelion script.

The G1, G2, G3 continuity options, and the Bulge slider were borrowed and adapted from BLEND command.

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-8  9-13