MoI discussion forum
MoI discussion forum

Full Version: Nodebundle for playing with nodes

Show messages:  1-5  …  1346-1365  1366-1385  1386-1405  1406-1425  1426-1445  1446-1465  1466-1485  …  1846-1859

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

From: mkdm
18 Mar 2019   [#1406] In reply to [#1405]
Amazing James!

Great job!!

Message 7777.1407 was deleted


From: bemfarmer
18 Mar 2019   [#1408] In reply to [#1405]
Much nicer than a recent stucco expanded metal purchase.
From: speedy (AL2000)
19 Mar 2019   [#1409]
Hi James
for what little it is worth ..
amazing result
alberto
From: James (JFH)
19 Mar 2019   [#1410] In reply to [#1409]
Thanks Al

It is worth a lot,

James
From: bemfarmer
22 Mar 2019   [#1411]
After 2 weeks of intermittent coding, study of many nodes, mostly by Karsten, and hundreds of corrections, a node for LineWeb was created.
There are many comments in the code, which could be removed.

In addition to the LineWeb node, a simple demo node program is attached.
Copy the LineWebNode.js file in the nodeeditor Extensions folder.
This will place the LineWeb node in the Construct2 menu.
(Construct2 could also be edited to include the LineWeb node code.) Maybe Karsten or James will do this, after the node is tested?

Testing has been minimal.
Input of other objectlist types has not be tested, nor is there any code to check for other types of objectlists.

- Brian

Attachments:
LineWebNode.zip
LineWebNodeDemo04.zip


From: bemfarmer
23 Mar 2019   [#1412]
For simple curve nodes such as Line, Circle, Star, Polygon, Curve/Interpcurve, ..., wired to an Output node, what color will the curve be drawn in?

If the Output node has "--" set for Style color, the color drawn will be the Style color currently in effect for MoI:
a. when the curve output is Wired to said Output node. And Run.
b. when the curve output is Rewired to said Output node.
c. when the node program is re-Loaded and Run.

If the Output node has a Style color set in it's Info box, that will be the color drawn, at Run, or during Run, over-riding a previously wired MoI Style color.
In the current session, Switching the Output node Style color set in it's Info box back to "--", reverts to the MoI Style color previously in effect, (even if MoI Style was changed, and there was no rewire.) (The previous wired color is "remembered" for the current MoI nodeeditor session.)

- Brian
From: bemfarmer
24 Mar 2019   [#1413]
Normal Distribution, Bell Curve.
- Brian

Attachments:
NormalDistribution.zip


From: bemfarmer
26 Mar 2019   [#1414]
UnwrapCurve node, with majority of the code from UnwrapCurve script of Michael, made compatible with nodeeditor.

Learned that script (sub) functions are located in nodeeditor basicFunctions.js. LengthSq was not in there,
but magnitude(vec) was, as well as normalizeVec(vec) and scaleVec(vec,factor).

dir.scale( 1.0 / magnitude(dir) ); code did not work properly, (Lines and curves had Unwrap length squared, but circles and stars yielded the correct Unwrap length.)

but, dir = scaleVec( dir,1/magnitude(dir) );, did work properly.

(Limited testing)
There is no code to restrict input to curves...

- Brian
From: Frenchy Pilou (PILOU)
29 Mar 2019   [#1415]
2 Trivial questions just for concept! :)

Does Elephant can call an existing command like the last InsertCircle by Michael ?
http://moi3d.com/forum/messages.php?webtag=MOI&msg=9266.88

If by miracle yes, send it a wished radius value can be possible?

Of course i can make differently even without the InsertCircle (because you must click at each time) ;)
Array on Curve + Boolean Union made that very well! ;)



(about Array on Curve just (re) discovered that you can move the Base's & Offset's Points during the run of it! :)


From: Michael Gibson
29 Mar 2019   [#1416] In reply to [#1415]
Hi Pilou,

re:
> Does Elephant can call an existing command like the last InsertCircle by Michael ?

No, not quite exactly - Elephant does not call a "command" in MoI its nodes call MoI's script functions which is also what commands call.

But it is possible to make a node that does the same thing that "InsertCircle" does though, by using the same script that the command uses. Basically it's packaged up differently.

- Michael
From: Frenchy Pilou (PILOU)
29 Mar 2019   [#1417] In reply to [#1416]
Thx for explanations! :)
From: Karsten (KMRQUS)
29 Mar 2019   [#1418] In reply to [#1415]
Hello Pilou,

you don't need a special node. You can do it with the known ones.

Have a nice day
Karsten

Attachments:
BU.nod


From: Michael Gibson
29 Mar 2019   [#1419] In reply to [#1418]
Oh yeah - InsertCircle doesn't really do very much, just creates a circle and does boolean union. So yeah like Karsten says those things are available in current nodes.

But just in general the node editor doesn't call a particular MoI "command" directly by the command name, it calls script code just like a command calls script code.

- Michael
From: Frenchy Pilou (PILOU)
29 Mar 2019   [#1420]
Sure :)
Now Nodes can take any selection and made an Boolean Union ? I suppose yes :)
From: bemfarmer
30 Mar 2019   [#1421]
Here is a recreational .nod file to create Mutual Pursuit Curves for your favorite creatures, one of which is located at each corner of a regular polygon.
Each creature "chases" the creature located counterclockwise.

After creating the curves with nodeeditor, switch to regular MoI entry. Then LineWeb can be used on each pair of curves, to create geometric patterns.
Tiling the patterns makes interesting graphics. Planar colors is another option.
(I may do a logarithmic array of points on a line/curve, and/or a logarithmic or geometric series of points for LineWeb.)
The inner ends of the curves can form a mini polygon. The origin is a limit. The curves are some sort of log curves.

- Brian

The main link, which shows several patterns, is: https://www.mathcurve.com/courbes2d.gb/poursuite/poursuitemutuelle.shtml

The equations used were from the linked German site: https://did.mat.uni-bayreuth.de/material/verfolgung/node5.html
Translation can be done in Chrome browser.
Translation can also be done in the Windows 10 Microsoft Edge, but it is necessary to install the free Microsoft Edge translate app. (Fairly easy to do and enable.)
(The various equations on different sites are fairly obtuse to understand.)


Attachments:
MutualPursuitCurves.zip

Image Attachments:
Pursuit4bWeb.png 


From: bemfarmer
30 Mar 2019   [#1422] In reply to [#1421]
In a TV show last night, a video was shown of about 20 turkeys, continuously walking and following each other around a circle of radius 8 feet.
There was a dead cat in the middle.
I did not buy the theory that the turkeys were hypnotized.
My explanation is that the turkeys were engaged in Mutual Pursuit. That they liked to follow each other.
The turkeys perception of the danger of the dead cat prevented the collapse of the mutual pursuit curve.
(The turkeys did not recognize that the dead cat was no longer dangerous.)
How the circle began is not clear. :-)

- Brian
From: bemfarmer
30 Mar 2019   [#1423]
Here is a simple .nod program with logarithmic spacing of between 2 and 20 points, on a line from x=1 to x=10. (Slider numbers can be altered.)
Also included are a few demo nodes, Flowing the points to another curve (a longer line in the demo), with Stretch option.

It is also possible to do Geometric spacing, in another node. (Progressive node has geometric progression.)

The fairly simple math equations came from a typewriter era program called Gridder (BSD license), and are explained in Appendix I of the Users Manual.
(There are numerous typo errors in Appendix I, but not too serious. It was fun and only a little awkward to understand and verify the equations, with a few corrections.)
(Source code was not examined.)

https://meshing.lanl.gov/gridder/users_manual.html
https://meshing.lanl.gov/gridder/gridder.html

- Brian

Attachments:
LogarithmicSpacing.zip


From: James (JFH)
31 Mar 2019   [#1424] In reply to [#1411]
Brian,

I have only just now had a chance to look at your new node contributions. I am excited that you have picked up the ball and run with it.

Regarding Lineweb node: I don't know whether you were already aware, but Karsten's mPath-Array node already offers the this functionality. Have a look at nod file below.

mPath-Array also has the advantage of accepting numArray inputs into DivRail, and so eg your Logarithmic distribution may be mapped to any length of curve. (click on the switch widget below)

Your Mutual Pursuit Curves nod files look interesting. I'm going to have a better look.

Keep up the good work
James

Image Attachments:
pathArray-LineWeb.gif 


From: bemfarmer
1 Apr 2019   [#1425] In reply to [#1424]
James, thank you very much for the multiple information. I was not aware of the power of Karsten's mpath-array node.
The DivRail is a powerful feature.
I found that the time spent on the LineWebNode was very educational, even though the node turns out to be superfluous.
I want to try variable spacing, such as the log spacing, with hopf circles, to see if the resulting network has less "wrinkles" in the hopf torus projections.
Also if multiple lobes can be simultaneously created.

Alas, winter "play" season is over, so less time will be available for nodeeditor, MoI, or documentation. :-)

- Brian

Also, graphing a curve in MoI may be useful in finding curve closure "root" values of parameters.

Show messages:  1-5  …  1346-1365  1366-1385  1386-1405  1406-1425  1426-1445  1446-1465  1466-1485  …  1846-1859