MoI discussion forum
MoI discussion forum

Full Version: Nodebundle for playing with nodes

Show messages:  1-11  …  1392-1411  1412-1431  1432-1451  1452-1471  1472-1491  1492-1511  1512-1531  …  1852-1859

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

From: bemfarmer
8 Apr 2019   [#1452] In reply to [#1451]
Here is an early beta version, which actually works in the xy plane, for 3+ planar poly objects.
Further testing needed.
Test 2D polys in 3D space, Poly triangles of portion of an icosahedron, is working.

Copy CentroidNode.js to nodeeditor\nodes\extensions folder.

For Testing, open Ico5Poly.3dm, of color Orange.
Also Load PolyCentroidNodeTest3.nod into nodeeditor, or some other test .nod, and Run it.

The extra point at the origin is to be investigated. EDIT, the pointarray centroidPt (pink node dot and pink wiring), is defective. (Should not be curve mode either.)

- Brian

Earlier a strange effect occurred. An icosahedron was loaded from Obj Library. 15 edges of 5 side faces were joined to form 5 polygons. Did a 2X scale of, and moved, the "Ico5Poly"
Icosahedron was deleted.
Running the CentroidNode found the centers of the Ico5Poly, But strangely also caused the orange icosahedron to re-appear.

Edit: See post 1456 for beta3.

Attachments:
IcosahedronPolyPortionTest.zip


Message 7777.1453 was deleted


From: bemfarmer
8 Apr 2019   [#1454] In reply to [#1453]
Thank you James.
It is easy enough to modify CentroidNode.js to load in the Points2 menu,
or else to just copy paste the code to the Points2 menu, minus a very few characters at beginning and end of CentroidNode.js.

I'm not sure how easy it is to convert from faces to polygon outline with miscellaneous nodes. Or if the CentroidNode should have face to edges to polygon feature added, along
with the next MoI Beta, pending Michaels upcoming surface.isPlanar property, as per previous posts.

The pink centroidPt output is still broken...AFAIK.

The script has barely been tested...

Might as well add circle and ellipse?

- Brian

Integration for closed curves centroids is still a dream:-)
From: James (JFH)
8 Apr 2019   [#1455] In reply to [#1454]
Brian,

>> Might as well add circle and ellipse?.....
Integration for closed curves centroids is still a dream:-) <<

Centroid for these shapes can be can be found by using subD/convertCurveToPoly node
before centroid node. Obviously the higher the "Div Profile" the more accurate.
For circles, any even number (except 0) input to "Div Profile" will give true centre.


For now I think your work is done here. I'd just remove centroidPt output socket.

I'm not saying it is not worth spending any more time on it, just that it good enough for now.
If you are keen to keep coding, in term of outcomes it would be better to investigate other possible nodes.
To this end, I have a suggestion, if you are interested: FATLINES.

A Fatlines node analogous to Max's scripts of the same name would be a real boon IMHO to NE.
Think islamic patterns, for example. Anyway its just a thought.

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

Image Attachments:
closedCurves.gif 


From: bemfarmer
9 Apr 2019   [#1456]
CentroidNodeBeta003

The file is still in its own .js node wrapper, but has been moved to the Points2 menu. (not the Points2.js file, which could/should be done.)
So after placing beta003 in the extensions folder, if the node appears red in your .nod program, replace the node with the one from the Points2 menu.

Also fixed the raw centroid point(s) output (Pink) with the proper code, as shown in Objects.js/ObjtoArray node. (output2.pushPoint(cPtObj.item(0).pt);)
(Just use either the centroidObj point output, or the pink output, to avoid duplicate points...)

Note that Max's cVolume2 script finds centers of gravity for one extruded closed planar object, including extruded curved closed planar objects.
It seems to be a very long script.

Will look at FatLines.

- Brian

Attachments:
CentroidNodeBeta003.zip
PolyCentroidNodeTest4.zip


From: James (JFH)
9 Apr 2019   [#1457]
Just for a bit of Conic Relief



Node circuitry images post to: https://www.instagram.com/nodeology/

James

NE folder can be found here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9358.1

Attachments:
ConicRelief.nod

Image Attachments:
ConicRelief.jpg 


From: Frenchy Pilou (PILOU)
10 Apr 2019   [#1458] In reply to [#1457]
Cool image for Bees! (and for enlight users about subject of Nodes ! ;)

Sorry I have no times for the moment manage all nodes for a years! :(
From: bemfarmer
10 Apr 2019   [#1459] In reply to [#1457]
Hi James,
Do you have a link to "WaveSurf"?

For your old ProjectSurf.nod, replacing red Project node with Construct1/ProjectMP enabled the .nod to run.

- Brian

Your old paraSurf.nod has a couple of red nodes...in the copy I have.
From: James (JFH)
10 Apr 2019   [#1460] In reply to [#1459]
Brian,

>> Do you have a link to "WaveSurf"? <<

"WaveSurf" is a macro. I have attached nod file to previous post, so macro can be found within.
I had not included before, because there was nothing really new here in terms of technique. It was done specifically to post to instagram, to keep the page fresh.>> Your old ProjectSurf.nod....[&]....paraSurf.nod has a couple of red nodes..<<

All these macro need to be reworked. I don't know that any of them are worthy of dissemination. I only used "WaveSurf" and "B-Hive Grid" for that matter, due to laziness.

,>> Will look at FatLines. <<

Did you get a chance to study Max's script?

Anyway, keep up the good work
James
https://www.instagram.com/nodeology/
From: bemfarmer
10 Apr 2019   [#1461] In reply to [#1460]
James, thank you for WaveSurf macro.

I've looked at FatLines a little, and spread out, to line items, the functions shown scrunched into condensed paragraphs.

I see offset or flow, boolean union, scale1d, and still have to "decipher"/"understand" Max's code. :-)
Max is such a skilled programmer! There seems to be a lot going on...

I think that I will start converting bits of the code..., and fill in gaps in understanding...

- Brian

Message 7777.1462 was deleted


From: Frenchy Pilou (PILOU)
12 Apr 2019   [#1463] In reply to [#1462]
Cool !
I suppose you know that : https://www.etereaestudios.com/docs_html/isfahan_htm/isfahan_index.htm

and this facinated site! http://www.tamabi.ac.jp/idd/shiro/muqarnas/default.htm

and other cool things https://www.ics.uci.edu/~eppstein/junkyard/penrose.html

http://www.dartmouth.edu/~matc/math5.pattern/syllabus.html (Click Art Part section)

http://www.protozone.net/AJinteractives1.html
From: James (JFH)
16 Apr 2019   [#1464]
I was inspired by this image (top) to see if I could generate a buildable structure in NE.

All the plank elements are indeed straight (ie the bow from flow to surface has been removed).
However it is not quite there yet, because the plank thickness varies. They will need to be uniform thickness to make structure fabrication viable. Anyway it is a start.

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



NE folder can be found here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9358.1

Attachments:
hexPav.nod

Image Attachments:
hexPav.jpg 


From: Anthony (PROP_DESIGN)
16 Apr 2019   [#1465] In reply to [#1464]
wow very cool, useful, and ambitious. I hope you figure it out. Certainly a challenge.
From: Frenchy Pilou (PILOU)
17 Apr 2019   [#1466]
Cool start! :)
From: mkdm
17 Apr 2019   [#1467] In reply to [#1464]
Wonderful job James!!

Congrats!

Message 7777.1468 was deleted


From: speedy (AL2000)
24 Apr 2019   [#1469]
Hi everyone, and in particular Brian
Attached the file in which the Centroid tool
does not give the expected result ... maybe it will be
the case to consider well what this malfunction derives ...
Logically, when you have time, and if you want to do it
every tool we put at our disposal is a gift ...
"few words to the wise"

file at this link:
http://www.mediafire.com/file/oq4olj4yz9ame4y/FelixCandela.zip/file
have nice day to all
al
From: bemfarmer
24 Apr 2019   [#1470] In reply to [#1469]
Hi Speedy,

For the center 16 triangles, the centroid point is being found.

The remaining 32, 4 sided closed curves are not planar. This centroid node works for planar polygons.
(The Planar command does not work on the 32, 4 sided closed curves either.)

The center of mass of half of a solid sphere is at 3/8 of the distance from the sphere's center to the hemisphere's pole, as shown by Max's cVolume2.
For a hollow hemisphere, the distance is 1/2.
https://en.wikipedia.org/wiki/Centroid
The centroid node does not work for hemispheres either.

Wolfram gives a formula for center of mass for spherical caps.
Also Wolfram gives a formula for the centroid of a quadrilateral as the midpoint of the line between the midpoints of the diagonals.
Or "The centroid of the vertices of a quadrilateral occurs at the point of intersection of the bimedians."
http://mathworld.wolfram.com/GeometricCentroid.html
(Usually I find Wolfram math difficult to understand, and do not plan on doing integrals:-)
So the centroid for quadrilaterals, (4 line segments forming a closed quad), planar or non-planar, could be easily calculated.

The closed quads could be tested for planarity (somehow), and the calculation added to the centroid node. (I think.)

Is there a MoI method to test for planarity?

- Brian
From: James (JFH)
25 Apr 2019   [#1471]
Hi All,

Here's a texture of planar quad facets. It may not look like much, but it is a significant step towards structure that may be fabricated from cnc or laser-cut flat panels from board or sheet material. A multi panel image of node circuitry can be found at: https://www.instagram.com/nodeology/

James



NE folder can be found here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9358.1

nod file found here (Al made minor revision to my file & posted here):
http://www.mediafire.com/file/56jgl6gvgzg5a0m/Rev-DiaPlanarFaces.zip/file

Image Attachments:
PlanarQuads.jpg 


Show messages:  1-11  …  1392-1411  1412-1431  1432-1451  1452-1471  1472-1491  1492-1511  1512-1531  …  1852-1859