Nodebundle for playing with nodes
 1-20  …  1381-1400  1401-1420  1421-1440  1441-1460  1461-1480  …  1841-1859
Thread Split: Some posts in this thread have been moved here

Previous
Next
 From:  bemfarmer
7777.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.)


EDITED: 30 Mar 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.1422 In reply to 7777.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

EDITED: 30 Mar 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.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

EDITED: 30 Mar 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:  James (JFH)
7777.1424 In reply to 7777.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

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

EDITED: 14 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:  bemfarmer
7777.1425 In reply to 7777.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.

EDITED: 1 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:  James (JFH)
7777.1426 In reply to 7777.1425 
Brian, Karsten or any interested coder,

An exceedingly useful node missing from the toolset is a findCenter node,
that works analogous to Osnap rollover "centre".

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

EDITED: 3 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.1427 In reply to 7777.1426 
Some tentative thoughts:

What kind of center/centre is being sought?

Bounding box center may not find the desired center. Nor CenterAtOrigin script.

Centroid finding may require some integration, or calculations involving many points.

Prior center of mass/ centroid results: https://moi3d.com/forum/index.php?webtag=MOI&msg=9270.16

The area.js script that I have does not work in MoI4Beta.

- 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.1428 In reply to 7777.1427 
Brian,

>> What kind of center/centre is being sought ? <<

The Centre as defined by Object Snap.

Hope this helps,
James
https://www.instagram.com/nodeology/

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:  Michael Gibson
7777.1429 In reply to 7777.1427 
Re: center - here are some relevant script properties and functions that were added a while ago in V4. These can be called on a curve or a curve segment:

crv.isPlanar - Property that returns true if the curve's control polygon is planar.

crv.planarFrame - Property that returns a coordinate frame with an origin point at the curve's control polygon centroid and a z axis along the plane normal, only valid if crv.isPlanar == true.

crv.isOnPlane( frame ) - Function that returns true if the curve is on the given frame's x/y plane.

crv.isOnParallelPlane( frame ) - Function that returns true if the curve is on a plane parallel to the given frame's x/y plane.

crv.isClosed - Property that returns true if the curve is closed.

crv.isPeriodic - Property that returns true if the curve has periodic ends (overlapping control points at start/end rather than a corner point at the start/end).

crv.isDegenerate - Property that returns true if the curve has a degenerate control polygon with all the points stacked in the same spot.

crv.isLine - Property that returns true if the curve has the shape of a line.

crv.isSimpleLine - Property that returns true if the curve is a simple line segment made up of only 2 control points.

crv.isCircle - Property that returns true if the curve is a circle.

crv.isArc - Property that returns true if the curve is a circular arc.

crv.isEllipse - Property that returns true if the curve is an ellipse (either a full ellipse or an elliptical arc).

crv.conicFrame - Property that returns the coordinate frame of a circle, arc, or ellipse. Only valid if isCircle, isArc, or isEllipse returns true.

crv.conicRadius - Property that returns the radius of a circle, arc or the x-axis radius of an ellipse. Only valid if isCircle, isArc, or isEllipse returns true.

crv.conicRadiusY - Property that returns the y-axis radius of an ellipse. Only valid if isEllipse returns true.

crv.conicEndAngleRadians - Property that returns the end angle in radians of a circular arc. The arc starts at the x-axis of the arc's frame. Only valid if isArc returns true.


- Michael
  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.1430 In reply to 7777.1429 
Thank you Michael for the info.
Is there a script property that returns the center point of polygons (regular & nonregular) and ellipses, just as does “Center” Object Snap?

Thank you for your help,
James
https://www.instagram.com/nodeology/

EDITED: 3 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:  FDP
7777.1431 In reply to 7777.1430 
Win 7 64/MOI 3 here. Is there a simple up to date download and install guide for Nodeeditor/bundle? About a year ago I tried to migrate over from grasshopper and ended up giving up due to the time spent trying to get a working setup that reliably ran .nod files from people in this thread. Reading through the Wiki it seems like not much has changed, although there are some docs in the doc thread.
  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.1432 
That is missing is a little image for each script posted! ;)
not the script itself but the result!
---
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:  Michael Gibson
7777.1433 In reply to 7777.1430 
Hi James,

re:
> Is there a script property that returns the center point of polygons (regular & nonregular)
> and ellipses, just as does “Center” Object Snap?

For an ellipse see the isEllipse and conicFrame properties listed above. You'd do something like:

 if ( crv.isEllipse )
 {
      var center = crv.conicFrame.origin;
      ...

For a polygon there is not any single property for that but it can be computed the same way MoI does by the centroid of the polygon vertices.

You'd do something like look at .isClosed and .isPlanar and if both of those are true get the curve segments by crv.getSubObjects() then go through all segments testing .isLine on each one, if all are lines go through them and add together all the segment start point coordinates and divide by the number of points to get the centroid.

- Michael
  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.1434 In reply to 7777.1433 
Hi All,

Here's a macro for calculating centroid of polygons (reg & nonReg) & ellipses (incl circles),
based on Michael suggestion above. (thanks Michael, it seems so obvious now)

However, it is of limited use, because it is not multi-processing; which is to say,
that it could not be wired to a faceted surface; outputting the centroid of each individual facet.

For that a dedicated node is required.
Any takers?
James
https://www.instagram.com/nodeology/

EDITED: 14 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:  bemfarmer
7777.1435 In reply to 7777.1434 
I'm missing extractPts node...
I'll have to check your (James') recent posts...
(or maybe it was recently moved...
- 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.1436 In reply to 7777.1435 
Brian,

Try extension folder attached here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1404

It is the most up-to-date.

James
  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.1437 In reply to 7777.1436 
Thank you James. Extensions are now updated.
I'll take a look at doing a mutiprocess, but am quite busy now, with limited play time, so no promises :-)

- 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.1438 In reply to 7777.1437 
Thanks Brian,
If you can, it would be greatly appreciated
Have a great weekend,
James
https://www.instagram.com/nodeology/

EDITED: 5 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.1439 In reply to 7777.1434 
Hi James,

After some thought, it seems that the Input objects to a centroid node need to be defined.
It is necessary to "parse" the Input object into Cases, which should be possible with multiple IF statements.

I do not think that a node multiprocess sub function is required, (?), just sequential processing of the input objects, with For loops.

So far the centroid is being sought for Circles, Ellipses, and Closed Planar polygons consisting of line edges.
I've re-read Wikipedia centroid topic, and the centroid also applies to a closed planar polygon with a circular hole in it.

A faceted surface, (possibly 3D), would be broken down into Faces, inside or outside of the node, and each face tested to see if a centroid applies.

What about wireframe objects? Maybe planarize them?

At present, the centroid only applies to planar objects, or planar faces of 3D objects.

Example objects: Cube, open cube, cuboid, tapered cuboid, tetrahedron, icosahedron, nonRegular solid with planar faces,
cylinder, rounded off tetrahedron with a circular faces, and edges rounded off...

A look at scripts which handle faces might be helpful.

- Brian

Wikipedia also describes centroids for regions bounded by two continuoiu functions. Are NURBS curves continous functions, that would qualify? (Integration required...)

Centroids of NURBS bounded areas are possible to calculate. There is one Chinese article, but it was not downloadable...
Maybe for MoI version 6, Michael will create a factory for centroids... :-)

This is another link:
https://www.intmath.com/applications-integration/5-centroid-area.php
http://web.mst.edu/~ide50-3/schedule/lessons/21_Centroids.pdf

EDITED: 5 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:  speedy (AL2000)
7777.1440 
Hi James and Friends
I did this exercise, before loading the New Extensions
and in particular (extractPt ...) ;
but the result is similar to your ...
The real problem is that you can't get it to flow together
multiinput ... (Grasshopper with its branching, it could be
an inspiration to be able to reach this milestone in the future)

the file at this link:
http://www.mediafire.com/file/8d3b6uwm1a6455y/Baricenter_and_BBox_Center.zip/file
Have a nice Week-end to all
alberto
  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  …  1361-1380  1381-1400  1401-1420  1421-1440  1441-1460  1461-1480  1481-1500  …  1841-1859