Squircle script

Next
 From:  bemfarmer
5616.1 
Here is a simple script to make a squircle, also superellipses.

Had trouble getting the curve to close, probably due to sine, cosine, or power javascript (?), so had to add the first point to the end of the
curve factory.




// References:
// http://paulbourke.net/geometry/superellipse/
// http://mathworld.wolfram.com/Superellipse.html

Rebuild can reduce the point count a lot, without much change in the curve.

  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:  BurrMan
5616.2 In reply to 5616.1 
Nice.....
  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
5616.3 
Squircle cube. Rebuild,Trim,Network,Mirror.
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:  Michael T. (MICTU_UTCIM)
5616.4 
I just downloaded. I'll check it out later. Looks to be pretty useful. Thanks!

Michael T.
Michael Tuttle a.k.a. mictu http://www.coroflot.com/DesignsByTuttle
  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:  scott (SCOTTH)
5616.5 In reply to 5616.4 
Looks useful. I'm new to MoI though...
I know where to put the files, but how do I access the script from within MoI?

Thanks
  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:  Frenchy Pilou (PILOU)
5616.6 In reply to 5616.5 
Press the key TAB then write SuperEllipse2D
or make a ShortCut and write SuperEllipse2D inside the second column

Then Press the key TAB then write Rebuild if you don't want so many points ;)

EDITED: 5 Jan 2013 by PILOU

  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:  scott (SCOTTH)
5616.7 In reply to 5616.6 
Thanks.

I figured it out but you beat me back to the forum.
The files in the command folder are quite literally commands that you can assign shortcut keys to.
  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
5616.8 In reply to 5616.7 
Hi scott, yup that's correct - it's the actual name of the file itself (without any extensions on the end of it like .js or .htm) that is used as the command name.

- 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
5616.9 
Here is an upgrade of the squircle script, "SquircleZ2D," for placing half a squircle between two picked points.
The squircle is drawn in the z axis direction, but may have some portion with an x or y component.

Added in a slider for the shape. The slider does not continously update like the binding "Bulge" one in MoI blend factory, or maybe I've left something out.
(Another version has just numeric entry for the shape value.)

It is required that for the two points, either the x values must not be equal, or that the y values must not be equal. There is some buggy-ness in 3D view,
in the event that respectively, the x values and the y values are each very nearly equal.

I anticipate using the script to place squircles on two guide rails, in Top view, for a sweep.
Checking the repeat box permits many curves to be placed, quickly.

Did some testing with a cube edge skeleton, in 3D view.
Negative heights are allowed.
Used cross product to create an orthogonal axis for a new frame.
Re-used lots of code from many other scripts.
Did not provide for foreign languages "substitution" of name labels..."



Now to go back to the extremely difficult Levenberg-Marquardt solver.

  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:  Frenchy Pilou (PILOU)
5616.10 In reply to 5616.9 
About the algorithm
it's more easy say calculate in front view the Squircilcle between distance 2 points given, then rotate this result in the 3D Space
or calculate directly between 2 points in the 3Dspace ?
---
Pilou
Is beautiful that please without concept!
My Gallery
  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
5616.11 In reply to 5616.10 
peut etre?

Edit: Will try something else for the newport shell. The edge just needs to be swept or flowed or networked along 3D curve(s)...

EDITED: 7 Mar 2013 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