Squircle script
 1-20  21-40  41-44

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

Previous
Next
 From:  bemfarmer
5616.33 In reply to 5616.32 
A picture.
Image Attachments:
Size: 87.2 KB, Downloaded: 10 times, Dimensions: 469x209px
  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:  James (JFH)
5616.34 In reply to 5616.32 
UPDATED

Brian

Thank you for your work on Squircle node.
I believe your efforts to learn how to encapsulate your various scripts into nodes
will inevitably make they adoption more widespread.

As far as Squircle node goes, I think it would value from a "centre" input as per other shape nodes
so that it may dynamically positioned. Also the addition of multiprocessing is a vast improvement,
but it does not presently operate over multiple instantiations.

To get a better sense of my meaning, please have a look at attached NOD file.
Whereas the star ratios range across the array, the sqFactor applies similarly to each instance.
Hope this helps!

Keep up the good work
James
https://www.instagram.com/nodeology/

EDITED: 19 Feb 2022 by JFH

Attachments:

Image Attachments:
Size: 78.6 KB, Downloaded: 22 times, Dimensions: 990x241px
  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.35 In reply to 5616.34 
Thank you James.
Will study more tomorrow.

Most of the Object nodes have a Factory which handles Frames. So their examples only help partially.

"null" is used with Center input, for unspecified center. Each center frame comes from the pointarray inputs to Center.
var frame = center.getFrame();

Solids / polyhedron shows more about Frames.

infonodes by Karsten, (Infos/showFrame), shows how to add the frame to the x, y, z points of the curve factory,
which will need to be added to the two helper functions Polar2Cartesian() and eval_rho().
zValue input is no longer needed. z will come from the Center input.

- Brian

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:  bemfarmer
5616.36 In reply to 5616.35 
MOD3 version. With center.

Maybe zvalue should be restored?

- Brian

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:  James (JFH)
5616.37 In reply to 5616.36 
Great Work Brian,

It works perfectly now!
The only thing I would say is that a sqfactor range (0,1) might be more intuitive than the present minimum of 0.001
below which the curve disappears. This may simply be a line of code equating any variable value < 0.001 with 0.001
Anyway that's a small thing. The node works brilliantly as is.

Thanks
James
https://www.instagram.com/nodeology/

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.38 In reply to 5616.37 
Thank you James.

Managed to get rid of the vanishing squircle for sqfactor = 0.

Was not able to reproduce your .nod. Some of my settings must be incorrect.

- Brian

(Updated version of squircle_FG is in post 44.)

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

Message 5616.39 deleted 20 Feb 2022 by JFH

Previous
Next
 From:  James (JFH)
5616.40 In reply to 5616.38 
Thanks Brian,

I don't know if this is only happening for me, but "centre" input remaining in the code
it has disappeared from the node.

Any thoughts?
James
https://www.instagram.com/nodeology/
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
 

Reply to All Reply to All

 

 
Show messages:  1-20  21-40  41-44