Squircle script
 1-12  13-32  33-44

Previous
Next
 From:  bemfarmer
5616.13 
_squircularCyl script, (non-uniform), by Brian McMillin 2/13/2022.

This script produces a square to round cylinder, as per page 27 of the paper by Fong for the Fernandez-Guasti squircle, which is an intermediate shape between the circle and the square:
https://arxiv.org/ftp/arxiv/papers/1604/1604.02174.pdf
(For a uniform squircular cylinder, just extrude one squircle.)

loft suggested.

extruding the top and bottom squircles, and blending their two edges produces a similar, but different shape.

- Brian

EDITED: 14 Feb 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
Next
 From:  bemfarmer
5616.14 
SquircularConeNOT.
Call it serendipity. This script was supposed to produce a square to round cone, as per page 27 of the paper by Fong, but something unknown went wrong. After a loft, the 3D shape was so cute, I decided to keep the script. The only change was to multiply the radval by tau. (repetitively, by mistaken code.)

- Brian

EDITED: 14 Feb 2022 by BEMFARMER

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:  BurrMan
5616.15 In reply to 5616.14 
Thanks again Brian!

In the SquircleNOT loft, I added a point to end it.

Remember the point included at the end of loft allows the loft to end in a point...

Just 2Cents! But Thanks again for all the contributions you have made!

Burr
  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.16 In reply to 5616.14 
Here is a non-uniform SquircularCone.
radval = radiusMax * tau. (rather than repeatedly multiplying radval by tau.)

This cone looks good also.

Setting z=0 puts all the squircles in a plane.

- Brian

Undone, is a squircular cone with constant tau squareness in each cone, with tau varying between cones.
Maybe tomorrow.
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
5616.17 In reply to 5616.15 
Thank you Burr.
Adding a point looks good.

Object looks like some building or tower roof...

- 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:  wayne hill (WAYNEHILL5202)
5616.18 In reply to 5616.17 
Hi Brian,

Is this something that you would consider making into a node for the Node editor? ( Please say yes, because it I would also like to make it into a node, but you know far more as to how it works.)

Wayne
  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.19 In reply to 5616.18 
Hi Wayne,
Feel free to make the squircle variations into a node, or nodes.

I would, but am not so good a programmer, and winter light duty time will soon be gone.
And I have not finished the other script that has occupied the past 2 months.

This morning, I had a few ideas regarding a few, mostly "cone", combinations.
Basically to separate radius value from tau squareness.
Have radius value either fixed, or linearly variable, or geometrically variable.
Have tau either fixed, or variable.
(Modes?)

- 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
5616.20 In reply to 5616.18 
Here is a DRAFT version of a squircle node.
Add on an Output node, and the script works. Still does not like a sqfactor of 0.0.
Place the two files in the extension directory of nodeeditor.
Alternatively, the squirclefn file can be placed in the lib directory. It just contains two functions.
Still wondering if the two functions could be put in the squircle.js node file.

More testing to do...

- Brian

See post 38 for "final" version.

EDITED: 20 Feb 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
Next
 From:  Mindset (IGNITER)
5616.21 

  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:  wayne hill (WAYNEHILL5202)
5616.22 In reply to 5616.20 
Brian,

This is a good start. I was working on a different version, but still learning the function and how they go together. After following many of Max's node code, yes, the functions can be on the main code. Making it a multi-Process function would be a good test for speed.

Wayne

EDITED: 17 Feb 2022 by WAYNEHILL5202

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
5616.23 In reply to 5616.22 
Thank you Wayne.

I made a few changes to the node today.
Placed the two helper functions near the top of the .js file.
They are called a little bit different that the previous squirclefn file.
The squirclefn file was not really necessary, but could have been place in either the extension folder, or the lib folder.
Have not posted the changes yet...

- Brian

EDITED: 17 Feb 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
Next
 From:  bemfarmer
5616.24 
This new node is based upon translated mathematica code.

arcLoop.js is a node which produces a planar closed curve made up of arcs and a line for a flat side. It can display circle, ellipse, "lens", and 4 sided "diamond" quad lens shape. It can also have one flat side. It may be considered a cross section in a forthcoming script. Place arcLoop.js in the nodeeditor expansion directory.
The arcLoopNodePgm.nod may be placed with other .nod files.

The helper function is placed near the top of the .js file, not in a separate functions file.

- Brian

This is NOT a squircle node.
Do not claim to understand the math.
Have not been able to locate such loops with google searches.

EDITED: 17 Feb 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
Next
 From:  bemfarmer
5616.25 In reply to 5616.24 
Using MoI to investigate the arcLoop shows the affect of the parameters.
For "aspect" of 1:
Radial and Transverse = 0 results in a circle plotted as a curve. It is not a regular simple nurbs circle. (The loop becomes an ellipse for aspect !=1)
Radial != 0 alone causes a lens of the intersection of two equal circles.
Transverse !=0 alone causes a lens of the intersection of two equal circles, At 90 degrees.
The loop is that of two intersectiing circles. The rounded corners are just the natural rounding from limited numpoints plotting a curve with lots of points, which rounds the corners automatically, rather than a simple nurbs circle.

Both radial and transverse != 1 causes a diamond quad lens, with all 4 sides being circular arcs of many plotted points, with automatic corner rounding.
The loop approximates the intersection of 4 equal big circles.
For "aspect" != 1, the arcs are each a segment of an ellipse.

"Flat" tends to make a line flat area, for large enough flat value, on the right side.

radiusFil scales the loop. It does not "fillet" any corners.

radius also scales the loop.

- 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:  wayne hill (WAYNEHILL5202)
5616.26 
Updated node code to include sub functions and changed to a multi-Process node.

Will be making a version like the original MOI UI to create lofted cone objects.

Wayne
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
5616.27 In reply to 5616.26 
Nice work Wayne.

With a quick look, it appears that sqfactor and tau are both being used. But this is OKAY (at first I thought that it was not okay).

In notepad++ Ctrl+h helps with replacing one name with another, for myself.

 - Brian

Looking forward to your lofted versions.

I like initial tau = 0.5, the halfway shape between circle and square.
But after seeing numpoints = 1, maybe multiprocess is better with initial tau of 1?
I dislike numpoints = 1 as default(???)

Changing colors seemed to be a problem? Seems to be a need to unlink output curve to get colors to change? Maybe this is normal general behavior?

EDITED: 19 Feb 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
Next
 From:  bemfarmer
5616.28 In reply to 5616.27 
There is a problem with the complete info panel not showing up initially. (???)
After run is hit, the full info panel does show up.

- 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
5616.29 In reply to 5616.26 
So there is a bit of confusing usage of squareness. sqfactor vs tau.

tau is the linearized parameter for squareness, and tau is used in the papers equations,
The nonlinear "s" parameter (say sqvalue), of squareness is a function of tau.
The use of tau as a label for node input, does not mean anything to a user.

sqfactor seems like a good label for the node input parameters. sqfactor = 1 produces a square, (with slightly rounded corners.)
So sqfactor = tau is good to use.
("squareness" seems to be a good label, except for its length.)

A different name from sqfactor should be used in the function eval_rho. say sqvalue.
var sqfactor = (function of tau); should be replaced with something like:
var sqvalue = (function of tau);

- just an opinion,
- 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
5616.30 In reply to 5616.26 
Hi Wayne,
Using curve2/helix node for a model,
made a few minor changes to your squircle_t3mp node.
Info now shows properly.
Added sqvalue.

- Brian

See post 38 for "final" version.

EDITED: 20 Feb 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
Next
 From:  wayne hill (WAYNEHILL5202)
5616.31 In reply to 5616.30 
Hi Brian,

This is great.

Wayne
  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.32 In reply to 5616.31 
Just messing around a bit.

Added a zValue input, to Wayne's multiProcess node.

The Arithmetic progression changes the zValue(s). There are 10.

The radius Slider changes the radius.
Also, the radius is adjusted by being combined with "geo" slider to progressively change the Factor of the Geometric progression, so the radius changes along the 10 cross sections in a curve. (Or not curved, depending upon values...)

The sqfactor Slider just changes the sqfactor from round to square.

The Loft mysteriously changes the loft color to default black, which looks white.

These are just experimental settings and combinations.

- Brian
See post 38 for "final" version.

EDITED: 20 Feb 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-12  13-32  33-44