MoI discussion forum
MoI discussion forum

Full Version: Conformal Mapping to the Torus

Show messages:  1-3  4-23  24-43  44-45

From: bemfarmer
30 Jan 2019   [#24] In reply to [#22]
Thank you Karsten.

Is there an example *.js node which outputs many objects, and only one, say a circle?
(My attempt to output one circle resulted in output of as many copies of the circle as there were objects output...)


- Brian
From: Karsten (KMRQUS)
30 Jan 2019   [#25] In reply to [#24]
Hello Brian,
PatternSelArray, getCrvSFrame, ... gives independent different Outputs with different length.

it sounds that you tried it in a multiprocess function. Okay - could you post an example of the code? It is easier for me to figure out what happens on an code example.

Have a nice day
Karsten
From: bemfarmer
30 Jan 2019   [#26] In reply to [#25]
Hi Karsten,

Attached is a new .js node BADConformalMap, which will run in the node assemblage in about 12 seconds, but makes 100's of circles, instead of only 2.
The BadConformalMap.js can simply be copied to the nodeditor/node/extension folder.

The node assemblage is "ConformalMappingHexGridToTorus4BAD.

(Modifying the .js file requires that its former copy in the node assemblage be replaced with the modified version.)

I guess that a second multiProes needs to be added???


- Brian
From: Karsten (KMRQUS)
31 Jan 2019   [#27] In reply to [#26]
Hello Brian,

it is a Problem with the using of the multiprocess function. It is in your case not necessary to us it. It's more useful to use it for multiple data with n x m permutations. The core System calls it - depending of the mode for each data object in the Input stream. You have to create dummies for the Output in it, because the core System try to evaluate an Array of results as Long as the defined Outputs.
I've made some changes to your file - please study it. At the end it would be better and faster to process your curves in a for-loop and not in a multiprocess function.

Have a nice day
Karsten

p.s.: Nevertheless -Congratulations! It Works:-)

Attachments:
Mapping.js


From: bemfarmer
31 Jan 2019   [#28] In reply to [#27]
Thank you Karsten.

I will study it.

- Brian

Meanwhile, it was not very hard to turn the torus curved hex lines into a mesh with a square cross section, a solid, by using FLOW
to create the hex pattern on a slightly smaller torus with the same Rcircle. (The torus seams should match, i.e. both be on the same side of the tori.)
(The inner seam is made to match by creating the inner sweep circle by selecting the proper point, after selecting the circles center.)
(The seam of the circle can be checked by using the shortcut key for MarkCurveStart, on the circle.)
(It is helpful to have several different color styles in play.)
1. Create the surface pattern with hexes that have a small space between. This same space is used to form a smaller sweep circle of (r_radius-space), centered on R,
to make the smaller, inner torus.
2. Then for the outer edges, use the shortcut key v1.2 "select outer edges", (hide the 12 inner seam edges,) and join the hex sides to get hex curves.
3. Repeat for the inner edges.
4. For a pair of 12 adjoining hexagons, (which were two columns), perform 24 lofts between inner and outer edges. (24 manual lofts.)
5. Circular array these 24 hexagons, 12 copies around the torus.
6. Boolean Union the outer torus band, the 24 hexagon sides, and the inner torus band, to create the solid cage.
(A small circular Fillet did not work, after 20 minutes.)

- Brian

Image Attachments:
BlueCageSolid.png 


From: bemfarmer
31 Jan 2019   [#29]
Here is the simple algebra for calculating the two formulas for the "r" and "R" radii of the sweep and rail circles for the destination torus for the conformal
mapping to the torus. The formulas are incorporated in the conformalMapping node in mapping.js.
- Brian
(see next post)
From: bemfarmer
8 Feb 2019   [#30] In reply to [#29]
Updated .pdf for algebra and trigonometry to calculate r, R, rcircle, Rcircle, "center"points of hexes, normals.
The nice png graphic of a .3dm, with alt codes for theta and phi helps to explain the math.
The map is subject to verification, and could have errors, or typo's?

The center points of the planar hexagons, after conformal mapping, are only "more or less" center points of the "hexoids" on the torus.
These points are now mapped in an update to the conformalMapT node.
Also, registration geometry such as a square and triangle can be Style selected, (I used color "coral"), concatenated with hexagons, and mapped to the torus.
The registration marks should be added by hand to quadrant I of the MoI screen, before the .nod file is opened.
Circles are not closed after mapping due to software error/incompleteness.
https://moi3d.com/forum/index.php?webtag=MOI&msg=9066.6

Still need to code normals/lines through the center points.
I'll plan on posting the updated conformal node in a few days.

It was very difficult for me to get the points input and output slots coded correctly, with flu zombified brain, but Karstens corrections helped.

Is it possible to have TWO multiprocesses running in a node?

- Brian

I plan to draw some "hobnail" geometry of the Fenton glass type, as a memorial. It appears to be partial spheres in a hexagon arrangement.
I'll have to measure the percentage of a sphere. It is in tapered spirals.

Also used gemarray to place cones on the surface of a torus. The density in the center became too high, and needs size reduction/scaling, or thinning:-)

Attachments:
RadiusCircles_Theta_Phi_Normals_Centers_ForTheConformallyMappedTorus.zip


From: bemfarmer
15 Feb 2019   [#31]
A fairly unique ribbon?
From a conformal kagome torus mapping.

- Brian

Image Attachments:
ConformalKagomeRibbon.png 


From: Anthony (PROP_DESIGN)
15 Feb 2019   [#32] In reply to [#31]
very cool
From: Karsten (KMRQUS)
15 Feb 2019   [#33] In reply to [#31]
Looks Great! Chapeau!

What's next?
From: Mindset (IGNITER)
15 Feb 2019   [#34] In reply to [#31]
Wow!
How can we do that?
From: bemfarmer
15 Feb 2019   [#35]
Thank you everyone.
Hi Igniter,
Attached are the additional nodeeditor files needed.

For MoI4Beta, to plot the torus curves:
1. Have nodeeditor installed, on Windows (hopefully in %appdata%), or Mac, as documented on the forum.

2. Add MappingC.js to the nodeeditor/nodes/extensions folder. This will add ConformalMapT node to the transform2 menu. (I have yet to add normals to this node.)

3. Backup and replace objects2.js in the extensions folder. This contains slightly modified separateObj node, which will now pass on single subcomponent curves.

4. Open nodeeditor canvas in MoI4Beta and load ConformalMapKagome01.nod.
Run this nod. (Some of the "extra" wires are disconnected.)

The curves will be generated piecemeal, and at least one continuous string will
have to be manually joined. There are some extra duplicate curve segments, which can be avoided.
Any additional copy rotates and trims of the torus surface are up to the user.

Additional unnecessary remarks:
(Using the get_by_style node (color "coral" as set up), the lines on the flat torus could be created and mapped and likely avoid the joining. (Yet to be tried.))
(The get_by_style input method needs miscellaneous curve/ line segments to be entered in quadrant I of the MoI4Beta screen, before loading the ConformalMapKagome01 node. (Also connect the disconnected wires.)

- Brian

Attachments:
Kagome2019.zip


From: bemfarmer
18 Feb 2019   [#36]
Here is a .nod file with a macro for the "TennisBallClosedCurve" on a sphere.
The parametric formula comes from the Paul Bourke site, but was modified to yield lobes from 1 on up. (credit to be revealed later.)
- Brian

Attachments:
TennisBallCurve.zip


From: bemfarmer
21 Feb 2019   [#37]
Credit to Stephane Laurent, for more or less comprehensible Hopf Torus explanations and actual code.
Of his 5 blog examples, the first 3 are "fair", and the 4th is spot-on. The 5th is for the tennis ball curve, is without code, and the
formula as I coded it is off, probably due to the association of the number of lobes with t (?). (Another forum with "Silver" had partial similar data.
Link to #4 is:
https://laustep.github.io/stlahblog/posts/HopfTorusParametric.html

So I coded the trigonometry curve around a circle, and also the sinusoidal curve. They are very similar.
The tennis ball curve (only) was previously posted.

To coding in nodeeditor, so far I used only 3 points, for each lifted curve point, and so created MoI4beta 3 point circles, rather than plot many circle points.
The 3 points for each circle are at phi = 0, 2PI/3, and 4PI/3. Also 3 curves were created for these 3 angles, for network.
After running the .nod assembly, MoI was used manually.

Unfortunately network did not work for the 3 curves plus the many circles. I may try coding for one lobe, with more network curves...
Loft only worked for 1/3 + of the circles, which were for only one lobe, +a couple of circles. Then circular array (3) was used with some trimming and join, or boolean union. A solid resulted.
So conformal mapping, (more or less?), of say hexagons, is supposed to be possible, somehow. Provided half of the length of the sphere curve, and half of the sphere area (somehow related to the sphere curve) (= 1/4 the sphere area), match up with the hexagon parallelogram grid. The sphere curves examples are symmetric about the equator, so split the area into 1/2 of 4*PI*r*r. So probably the length of the sphere curve would need to be adjusted by the shape parameter. There is said to be a sphere curve for any parallelogram...

- Brian
(See post 41 for updated Hopf torus generator.)

Please consider the attached hopf .nod to be alpha.
There are 3 different sphere closed curve macros in the .nod, one of which is to be wired in at a time.
The tennis ball code is defective.
Other closed sphere curves could be coded, and inserted.

Sullivan, Pinkall, and Banchoff all have papers, but the math is very difficult to understand.
They say that geometry can be done, but do not say how...

Attachments:
GreenHopfTorus.zip
PurpleHopfTorus03.zip


From: bemfarmer
21 Feb 2019   [#38] In reply to [#37]
The tennis ball curve needs to have p3(t) renamed p1(t), and placed at the top of the 3 coordinates.
p2(t) needs to be renamed p3(t), and moved down to the 3rd coordinate.
The former p1(t) needs to be renamed p2(t), and moved down to the 2nd coordinate.

Somehow, before, the 3rd network curve was not hooked up in the correct order, or something, with my coding... (Why?)
The basic tennis ball curve seemed to have been rotated(?).

This yields a more rounded lobular hopf torus projection.
Will attempt the surface tonight, no time now.

- Brian
From: bemfarmer
22 Feb 2019   [#39] In reply to [#38]
Here is an update of the hopf node, with the tennis ball curve equation corrected, and hooked up.
It is currently set to 3 lobes, with only 3 "90ish degree" "network curves. For 4 lobes, only 3 "90degree" network curves are made, with one differently sized...
I'm going to learn how to do a dozen or two dozen of these "90degree" network curves, in nodeeditor, probably for only one lobe, and try out network.
Also the number or angles are to be made compatible with the number of lobes...

- Brian
(See post 41 for updated Hopf torus generator.)
From: bemfarmer
22 Feb 2019   [#40] In reply to [#39]
Dividing t by n permits one lobe creation, which lofts and circular arrays, and joins to a solid, for the trig curve, and for the sinusoid curve, all done in nodeeditor!

The tennis curve also yields a solid. Its one lobe t range is 0 to 2*n*PI/n.

- Brian
From: bemfarmer
23 Feb 2019   [#41] In reply to [#40]
Here is a slight update to the Hopf torus .nod.

The three spherical curve versions are switchable. A 3+ input switch would be nice... Also a double throw, triple pole switch...

The trig and sinusoid formulas make the same, or nearly the same Hopf torus, if their inputs are the same.

One lobe is calculated, lofted, circular arrayed, and joined, to a solid.

The number of total lobes can be 1, 2, 3, 4, ...
The shape factor can be adjusted.
The number of circles generated can be adjusted by numpoints.

A second set of 20 or so network curves has not been done yet.

- Brian

Attachments:
ParametricHopfTorus_3Versions01.zip


From: bemfarmer
25 Feb 2019   [#42]
For one lobe, without loft, with just the many circles, LINEWEB, curve version, can be applied to the circles.
Then, by selecting all of the circles and lineweb curves, NETWORK will produce a surface, but had slight wrinkles in the center area.
Circular array works, but join does not. Boolean union of the 3 circular array lobes, will make the 3 lobe solid, but with the slight wrinkles still present.
The loft version looks better.
- Brian
From: bemfarmer
27 Feb 2019   [#43] In reply to [#42]
The ElasticaSpherical3 script can be used to create a closed curve on the sphere.
For 4 lobes, the correct one quarter of this curve will make one lobe, but is must be oriented correctly.
The one that I used is similar to a portion of the tennis ball curve, which was used to orient the elastica curve portion correctly.
The curve was colored "coral", and the node "Get by style" (set to color coral), will select it, and then Karsten's mPath_array will yield points, for input into the previously posted spherically projected Hopf generator, including loft, circular array, and manual boolean union to a solid.
A nice looking 4lobe R3 Hopf solid resulted.
The correct orientation may be that the north pole of the 3 sphere is in the correct orientation for the spherical projection.
- Brian

(The beginning coral colored qtr spherical elastica, oriented, is inside the emerald Hopf solid.)

Attachments:
SphereElastic_Hopf4lobeOriented.zip


Show messages:  1-3  4-23  24-43  44-45