Nodebundle for playing with nodes
 1-10  …  1411-1430  1431-1450  1451-1470  1471-1490  1491-1510  …  1851-1859
Thread Split: Some posts in this thread have been moved here

Previous
Next
 From:  bemfarmer
7777.1451 In reply to 7777.1450 
Alert messages were added to see what is going on, or not going on.
I left off the () for getStartPt()...
 
- Brian

EDITED: 8 Apr 2019 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
7777.1452 In reply to 7777.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.

EDITED: 9 Apr 2019 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 7777.1453 deleted 12 May 2019 by JFH

Previous
Next
 From:  bemfarmer
7777.1454 In reply to 7777.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:-)
  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)
7777.1455 In reply to 7777.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/

EDITED: 9 Apr 2019 by JFH

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
7777.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

  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)
7777.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

EDITED: 6 May 2019 by JFH


  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:  Frenchy Pilou (PILOU)
7777.1458 In reply to 7777.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! :(
  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
7777.1459 In reply to 7777.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.
  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)
7777.1460 In reply to 7777.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/

EDITED: 17 Apr 2019 by JFH

  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
7777.1461 In reply to 7777.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
  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 7777.1462 deleted 14 May 2019 by JFH

Previous
Next
 From:  Frenchy Pilou (PILOU)
7777.1463 In reply to 7777.1462 

EDITED: 12 Apr 2019 by PILOU

  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)
7777.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

EDITED: 6 May 2019 by JFH

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:  Anthony (PROP_DESIGN)
7777.1465 In reply to 7777.1464 
wow very cool, useful, and ambitious. I hope you figure it out. Certainly a challenge.
  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:  Frenchy Pilou (PILOU)
7777.1466 
Cool start! :)
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  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:  mkdm
7777.1467 In reply to 7777.1464 
Wonderful job James!!

Congrats!

- Marco (mkdm)
My Procreate portfolio
  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 7777.1468 deleted 25 Apr 2019 by JFH

Previous
Next
 From:  speedy (AL2000)
7777.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
  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
7777.1470 In reply to 7777.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

EDITED: 25 Apr 2019 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-10  …  1391-1410  1411-1430  1431-1450  1451-1470  1471-1490  1491-1510  1511-1530  …  1851-1859