MoI discussion forum
MoI discussion forum

Full Version: Nodebundle for playing with nodes

Show messages:  1-12  …  1693-1712  1713-1732  1733-1752  1753-1772  1773-1792  1793-1812  1813-1832  …  1853-1859

Thread Split: Some posts in this thread have been moved here

From: Frenchy Pilou (PILOU)
10 Oct 2020   [#1753]
Sorry what is the meaning of "truchet" ?
That is from Sébastien Truchet ? https://en.wikipedia.org/wiki/Sébastien_Truchet
a random geometric tilling process ? So your nod ?


From: stefano (LIGHTWAVE)
10 Oct 2020   [#1754] In reply to [#1753]
Interesting read that Frenchy, he goes from fonts to tiles...genius.

https://en.m.wikipedia.org/wiki/Truchet_tiles
From: Frenchy Pilou (PILOU)
10 Oct 2020   [#1755] In reply to [#1754]
OK! You have also this cool one! ;)
Kite & Dart by Roger Penrose (Periodic, Aperiodic etc...)


From: stefano (LIGHTWAVE)
10 Oct 2020   [#1756] In reply to [#1755]
You might like this or get some node ideas maybe...leads onto "3d tiling".

https://www.cosmic-core.org/free/article-63-number-the-hexad-part-3-tessellations-tilings/
From: Frenchy Pilou (PILOU)
10 Oct 2020   [#1757] In reply to [#1756]
Look this post and aespecialy Muqarnas ;)
https://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1463
From: bemfarmer
23 Oct 2020   [#1758]
Made a helicoid node.
The v curves made with the stock Curve factory to not pass through the helical points.
The convertPts2 node uses MoI's Interpcurve factory so the curves pass through the points.
Max's Curve node has other versions of Interp., but the u and v points are not separated for inputs...

If network does not create the surface, or takes too long, a radial curve may be swept along the inner and outer helical curves.

- Brian

Javascript cosh(x) and sinh(x) are not part of ecmascript5.

Attachments:
convertPts2.zip
HelicoidAuger03.zip


From: bemfarmer
1 Nov 2020   [#1759]
The generalized formula for the monkey saddle surfaces is given here:

https://www.researchgate.net/publication/256808897_Monkey_Starfish_and_Octopus_Saddles

The binomial coefficients (N K) (vertical), for each order N saddle, are given in a row in pascal's triangle, using alternate entries.
For example, the Monkey saddle, with 3 dips, has coefficients 1 and 3.
The Octopus saddle, with 8 arm dips, has coefficients 1, 28, 70, 28, and 1.
Or the binomial coefficients can be easily calculated with factorials.
The formula for each order N, uses the Even values of K = 0, 2, ... (N for even N, N-1 for odd N).
The formula is the sum from K=0 to K=N of the binomial coefficient (N K) * x to the power(N-K) * y to the power(K),
* even powers of i, for a +/- factor.
Note that the .nod files use ConvertPts2 node, which can be downloaded elsewhere on the forum.

Network can be done on the curves, and the surfaces may be trimmed at a +/- z value.

The smelt petal is a trimmed Monkey saddle, with the Monkey saddle z-axis passing through the origin, and (1,1,1)

The z = f(u,v) in MathPoints may be easily done for 4, 6, and 7 arm_leg_tail dip surfaces.

- Brian

Attachments:
MonkeySaddle.zip
OctopusSaddle.zip
SimpleSaddle.zip
StarfishSaddle.zip


From: wayne hill (WAYNEHILL5202)
1 Nov 2020   [#1760] In reply to [#1759]
Hi Brian,

Great work! Converting formulas to programs is very challenging.

Wayne
From: bemfarmer
10 Nov 2020   [#1761]
Is there some way to add functions to MathPts node?
For example, perlinnoisefn.js, delaunator.js, and basicFunctions.js have functions used by other programs.

A very simple example would be say ellipticfn.js containing several functions, including
this.cosh = function(a,x)
{
var y = (a/2) * ( Math.exp(x/a) + Math.exp(-x/a));
return y;
}

Is there some way to get MathPts f(u,v) to be able to use cosh(a,u) with say elliptic.cosh(a,u)?

(Of course the catenary equation (a/2)* )exp(u/a) + exp(-u/a)) can be used in MathPts directly, but some other
desired functions are very much more complicated, with dozens of lines of code.)

- Brian
From: bemfarmer
14 Nov 2020   [#1762]
Trying to debug a node program.
Is there some way to add an alert message to a node program?

Example:

function alert( msg )
{
moi.ui.commandUI.alert( msg );
}

alert( 'a = \t' + a + '\n\n' + ' b = \t' + b );


- Brian
From: Michael Gibson
14 Nov 2020   [#1763] In reply to [#1762]
Hi Brian, try moi.ui.alert( 'msg' );

- Michael
From: bemfarmer
14 Nov 2020   [#1764] In reply to [#1763]
Thank you Michael.
Now the alert works. Each pass through the for loop creates a new alert.
The script probably has minor errors.

- Brian

Idea:
Include code around and/or in the for loop to show multiple progressive results for each variable.
In a row/column format. One row per variable. Each column is another pass through the for loop.
Say batch 10 alerts into one...
(My other projects have higher priority:-)

https://stackoverflow.com/questions/25320250/convert-multiple-alerts-to-one-alert
From: bemfarmer
15 Nov 2020   [#1765]
My latest script is creating junk points, so did some web exploring.

A math.js library of many additional functions, from 2017 to present.
(complex numbers, hyperbolic, elliptic, Weierstrass, etc.)

May be usable for MoI scripts and Nodes?
Still would need a "link" for MathPts node, somehow?

https://github.com/paulmasson/math

Barely began to explore the library.

- Brian
From: bemfarmer
19 Nov 2020   [#1766]
Update to CMC6 node, creates Nodoids and Unduloids, in particular their profile curves.

Rebuild, Mirror, Array, and Revolve left to the user.

Place CMC6.js and the helper functions ellipsefn.js file in the nodeeditor>nodes>extension directory.
CMC6_test.nod produces symmetric half of the nodary curve.

The CMC6 node script creates profile curves in the xy plane, including of most interest, the nodary curve and the undulary curve, depending upon the values of mu and lambda.

The Delaunay Constant Mean Curvature (CMC) surfaces consist of the cylinder, sphere, catenoid, unduloid, and nodoid. The surfaces may be produced by revolving their respective profile curves about a revolve axis equal to the rolling (roulette) line, which was used to generate the profiles. The profile curves are the roulettes of line, circle, parabola, ellipse, or hyperbola, along said roulette line.

The roulette axis for the nodary curve passes through the upper vertex of the hyperbola, which the script has not yet found.

There are additional notes in the comments in the script js file.

This node script uses ellipticfn.js for F(phi,k) and E(phi,k) the incompletic elliptic integrals of the first and second kind. It is assumed that "k" in the paper is the same as"k" in the elliptic functions, rather that using "k*k" in the functions.

- Brian

(Strangely, the y values must be divided by 2 to get the proper sphere and cylinder profiles.)

[See post 1777 for updated CMC files.]

Attachments:
ellipticfn.7z


From: bemfarmer
19 Nov 2020   [#1767] In reply to [#1766]
The paper also describes using two radii as inputs for mu and lambda, so more work may be done.
Connection to the semi-major and semi-minor axes of ellipse and hyperbola is also a question.
There are several papers using nodulary curves for membrane fusion, squashed bubbles, etc., but their equations did not seem to work...

- Brian
From: bemfarmer
19 Nov 2020   [#1768] In reply to [#1767]
The undulary curves seem to work. The values of mu and lambda are positive, but
must be very small, as per mu constraint.

- Brian
From: bemfarmer
19 Nov 2020   [#1769] In reply to [#1768]
The nodoid and profile are colored coral.

Using Orient Line/Line, the blue unduloid became emerald, and was connected to the Honeysuckle unduloid.




- Brian

Image Attachments:
Nodoid_Unduloid-0000.png 


From: bemfarmer
19 Nov 2020   [#1770]
RadiiInputMacros.zip contains two Macros, with inputs RadiusMax and RadiusMin from the symmetry axis line.
Outputs are mu and lambda. (Simple formulas from the paper.)
Nodoid Radii.nod is a front end Macro for producing Nodulary profiles.
Unduloid Radii.nod is a front end Macro for producing Undulary profiles. For minRadius = 0 a quarter arc is supposed to form, (sphere CMC), but
in actuality, one quarter of an ellipse is formed. (So there may be some error somewhere, the paper or the node.)

Place the two Macros in the Nodeeditor Macro folder. Wire in either as input to the CMC4 node. For input to either Macro,
two radius input sliders can be wired in.

The Macro menu in a nodeeditor window does NOT scroll. So space for the number of Macros is limited by the height of the canvas window.

Changing k to k*k had no effect, re elliptic integrals. The quarter ellipse profile remained the same, and did not turn into a quarter arc.

- Brian

Slider radius inputs for nodoid of 0 to 2 seem nice. Divide by zero and infinity seem to be handled OK by nodeeditor.
Note that revolve axis is parallel to the y axis, in the xy plane. Which line, and the position of the hyperbola and the roulette line is not clear.
The roulette line for the nodulary is to the right of the nodulary curve, focus length from its vertex. (?)
Which I think should be the revolve axis?

See post 1777 for node containing radii macros.
From: bemfarmer
21 Nov 2020   [#1771]
Node to produce the upper curve of a hyperbola, and its focus point.
"a" and "b" are the semi axes. The node uses exponential equations for cosh and sinh.

A tangent from an end point can be built, but there are two of them, which seems wrong.
One tangent passes through the origin, and the y intercept is Not the Conic command apex point.
The second tangent passes through the y axis a bit lower down, and using this apex point,
the MoI conic command can produce the same hyperbola curve visually.
Upon zooming way in, the MoI conic nurbs curve is slightly different, probably due to the limited
number of points used for the node program.

There is probably some formula for calculating the Conic command parameters from a and b...

The new Dimension commands are very useful for labeling the geometry.

- Brian

Corrected faulty hyperbola node. I wondered why the ends were drooping:-)
(Note that using Michael's Hyperbola script is preferable.)

Attachments:
Hyperbola04.zip


From: Michael Gibson
21 Nov 2020   [#1772] In reply to [#1771]
Hi Brian, here are a couple commands for making a Hyperbola and Parabola from foci points.

- Michael

Attachments:
Hyperbola.zip
Parabola.zip


Show messages:  1-12  …  1693-1712  1713-1732  1733-1752  1753-1772  1773-1792  1793-1812  1813-1832  …  1853-1859