News:

Please remember to do a search before you ask a question!

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Uniform Spline Stretch on Z Axis

Started by MicheliDE, August 23, 2020, 07:10:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alvin Gregorio

Quote from: Alvin Gregorio on September 05, 2020, 07:08:16 AM
...
____
Now I have something to know what I am after.
____
Dean-- How will you know when you have accomplished what you are trying to accomplish?  What's the end-goal?

I think I would start with something like this-- one of inventor Jayden Harman's "Vortical Flow Rotors" (partial screen-capture of document in attached image below).
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Andy H

#51
Just been having a play.  The animated gif is just 2d, not figured out the calculation for 3d yet.  I made too many spirals hence when zoomed out the spiral gets tiny for a while.

It uses something called a golden spiral. Very similar to the fibonacci  spiral. Which apparently is only a tiny bit different.  But don't complain if I'm wrong.  I got the information off the internet.

Probably nothing like what is required, but its similar to the image in reply 25.  Yeh, I used AnimationLab, not played with it in quite a while.

OK.  For some reason, the Gif will only save as transparent background or dark grey. So its transparent. Clicking the 'dot' where the image normally is, will start the animation.

murray dickinson

#52
That video is optically misleading, I can't tell if the impellor inspires a sympathetic or contra-rotating vortex.  I remember the boat that Jay Harman created being featured on the old science magazine TV series "Beyond 2000" in the 1980s or 1990s, but I dispute "invention" being applied in this context.  His Wild Thing boat is a rigid, vacuum-formed acrylic hull with inflatable elements, the novelty is in their combination, not in their individual design of the features, or their manufacture.   I liked the thing, but it shouldn't have been granted a patent IMO. 

Henry Hubich

#53
To draw a logarithmic spiral, simply use

x=[c1*exp(c2*u)+c3]*cos(u)
y=[c1*exp(c2*u)+c3]*sin(u)

Where c1, c2, and c3 are constants that determine the specific size and growth rate. First attachment shows an example.

Add a function of u for the Z expression if you want it in 3D, as in the second attachment.

Henry H

Henry Hubich

#54
Dean, is the Fibonacci spiral what you want to draw? Wiki sez that it's an approximation of the "Golden spiral," which can be drawn with Curve from Law as shown in the attachment below. You won't be able to use it as a Sweep path, however, until you set Umin somewhat greater than zero, because it's too tightly curved near the origin.

Henry H

Dean

Quote from: MicheliDE on August 23, 2020, 07:10:07 AM
Hi All,

Is there a way to Stretch a 2D Spline uniformly into a 3D Spline from end point to end point along the Z axis to make a sweep or rail path for a Vortex? Using snap points for a 3D spline is the other way I can think of but that will require a lot of exactly positioned 3D Boxes to create. Is there another way?

Best Regards,
Dean

I'm not sure if this helps but you can morph a spline in Anilab, might be fun anyways.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Alvin Gregorio

Quote from: Henry Hubich on September 05, 2020, 06:56:08 PM
Dean, is the Fibonacci spiral what you want to draw? Wiki sez that it's an approximation of the "Golden spiral," which can be drawn with Curve from Law as shown in the attachment below. You won't be able to use it as a Sweep path, however, until you set Umin somewhat greater than zero, because it's too tightly curved near the origin.

Henry H


Henry, would you do me a favor--

Could you state, in layperson's terms, in a sentence or short paragraph, what that function/formula results in.

Something like "When entered a given value for distance (u), creates a continuous path, beginning instantly at the "u" value, then progressing..."

That'd sure be helpful for gaining some understanding of all this.

Thanks, Alvin
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

Also, if you Exploded that Spline Henry, where would the Control Points be if you activated the Edit Tool, and opted for "Edit Control Points"?
Would they be on the curve, as displayed?; or would they be out in space-- the Frame-- which is what the Curve From Law function/formula actually outputs?
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Henry Hubich

Quote from: Alvin Gregorio on September 06, 2020, 04:47:22 PM
Quote from: Henry Hubich on September 05, 2020, 06:56:08 PM
Dean, is the Fibonacci spiral what you want to draw? Wiki sez that it's an approximation of the "Golden spiral," which can be drawn with Curve from Law as shown in the attachment below. You won't be able to use it as a Sweep path, however, until you set Umin somewhat greater than zero, because it's too tightly curved near the origin.

Henry H


Henry, would you do me a favor--

Could you state, in layperson's terms, in a sentence or short paragraph, what that function/formula results in.

Something like "When entered a given value for distance (u), creates a continuous path, beginning instantly at the "u" value, then progressing..."

That'd sure be helpful for gaining some understanding of all this.

Thanks, Alvin

Try this, Alvin: Copy the two lines shown in red below and paste into a new Word document for easy access. Then copy just the first line; then minimize Word.

Fire up TCad and in an empty drawing, working in World Plan view and World CS, open the Curve from Law tool. (in my installation, it's a toolbutton in  the Curve tool flyout.) The Laws Editor will open. Highlight the "x(u)=" window and press Ctrl+V to paste what you'd just copied. Access the Word document, copy the second of the lines that you had previously pasted there, and then paste it into the "y(u)=" window in the Laws Editor. Type a zero in the "z(u)=" window. Click OK. Click anyplace in the drawing and drag the mouse to the right. You should see the curve being drawn when the "U max" window displays 30 or thereabouts. Click again whenever you like, to finish drawing.

Now you can experiment with it. Select the curve and open the Selection Info palette. Expand the "Curve from Law" option in the lower window. Any edits you make in any of the five windows will immediately update he curve. Experiment with Umin and Umax first. Then make smallish changes in the various numerical values. You'll notice that to keep the curve from becoming lopsided you must make the same numerical change(s) in both the X and Y Laws.

To make this a 3D curve, you have to put an expression involving "u" in the "Z-Law" window. For starters, just type "u" there and switch to Front or Side view to see the result. Then try "6.5*sqrt(u)." Try "2*u" and "2*sqrt(u)." Play around.

Here are the two lines to copy-and-paste:

[1*exp(0.1*u)+0.5]*cos(u)
[1*exp(0.1*u)+0.5]*sin(u)

Henry Hubich

Quote from: Alvin Gregorio on September 06, 2020, 05:07:18 PM
Also, if you Exploded that Spline Henry, where would the Control Points be if you activated the Edit Tool, and opted for "Edit Control Points"?
Would they be on the curve, as displayed?; or would they be out in space-- the Frame-- which is what the Curve From Law function/formula actually outputs?

They're out in space, Alvin, but only a little way.

Henry H

Alvin Gregorio

Quote from: Henry Hubich on September 06, 2020, 05:52:16 PM
...

Try this, Alvin: Copy the two lines shown in red below and paste into a new Word document for easy access. Then copy just the first line; then minimize Word.
...

Here are the two lines to copy-and-paste:

[1*exp(0.1*u)+0.5]*cos(u)
[1*exp(0.1*u)+0.5]*sin(u)


Thank You for that Henry.  It's appreciated-- I know that's a lot of typing to do.

Unfortunately, I don't have a version of TurboCAD that has the From Law tools.  Still stuck at V21.

What I was hoping for was something more like an explanation of what an engineer, mathematician, or physcist would be trying to achieve that the Law function/formula would produce.  I now have Wikipedia open to the "Golden Spiral" page, since you mentioned that; I think a study of that Wikipedia page should help (I'm always sure to donate my $5 or $10 annually to Wikipedia; I love Wikipedia!-- don't know where inquisitive minds would be without it and Google).
______
Question:  How does the Curve From Law tool, with those expressions, know when to stop the displayed curve?... what in the Law defines the "length" of the spiraled entity?
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

It would be useful if TurboCAD could do what the original post this thread requested-- demonstrated in Don's 2 images that he posted on the SolidWorks forum, using a contorted paperclip on his desk.

It seems we've wished for this a few times before-- to be able to dynamically alter an object, while maintaining its length and other physical metrics.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

More questions Henry--

If one graphically models a 2D Golden Spiral-- say a Fibonacci spiral-- then "pins" the innermost point and pulls up on the outermost point (such as Don demonstrated with his paperclip), does/will the spiral maintain its Golden_Spiral-ness?

Put another way-- If one creates a formula for the X,Y of a Golden Spiral, does adding a Z function to the formula result in the exact same spiral, when viewed from the top?  Without factoring in a k-factor-- a stretch factor-- I can't wrap my mind around how that would be possible.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

murray dickinson

#63
Quote from: Alvin Gregorio on September 07, 2020, 03:49:35 AM
It would be useful if TurboCAD could do what the original post this thread requested-- demonstrated in Don's 2 images that he posted on the SolidWorks forum, using a contorted paperclip on his desk.

It seems we've wished for this a few times before-- to be able to dynamically alter an object, while maintaining its length and other physical metrics.

You can, provided you use 3D curves and polylines rather than 2D, even if they're drawn as 2D figures, and you can extend 2D figures into the 3D domain by extruding them and surface intersecting the extrusion with a suitable 3D body.    3D polylines and curves drawn in ortho view are planar on the XY, XZ, or YZ planes that you're ortho to.  One of the default Ruby scripts imports coordinates as XYZ polylines, if the coordinate list doesn't have a Z value, 0 is assumed, ie it's flat, 2D, but a 3D polyline. I've explained here before that I prefer to use 3D curves even if their coordinates are coplanar because you can node edit multiple curves and/or 3D polylines on different workplanes together, 2D curves won't do that.  But you can also distribute the control points minute discrete increments off their initial plane, after doing that you can use node edit's selector mode to distribute them proportionately in the Z domain in a single transformation. 

Alvin Gregorio

Quote from: Henry Hubich on September 06, 2020, 06:00:55 PM
Quote from: Alvin Gregorio on September 06, 2020, 05:07:18 PM
Also, if you Exploded that Spline Henry, where would the Control Points be if you activated the Edit Tool, and opted for "Edit Control Points"?
Would they be on the curve, as displayed?; or would they be out in space-- the Frame-- which is what the Curve From Law function/formula actually outputs?

They're out in space, Alvin, but only a little way.

Henry H

I could ask another follow-up question on this Henry, but basically-- can you show us a screen-capture of the "Curve" page of the Properties of that once-Exploded,-now-Spline Curve From Law curve.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Henry Hubich

Quote from: Alvin Gregorio on September 07, 2020, 06:54:30 AM
Quote from: Henry Hubich on September 06, 2020, 06:00:55 PM
Quote from: Alvin Gregorio on September 06, 2020, 05:07:18 PM
Also, if you Exploded that Spline Henry, where would the Control Points be if you activated the Edit Tool, and opted for "Edit Control Points"?
Would they be on the curve, as displayed?; or would they be out in space-- the Frame-- which is what the Curve From Law function/formula actually outputs?

They're out in space, Alvin, but only a little way.

Henry H

I could ask another follow-up question on this Henry, but basically-- can you show us a screen-capture of the "Curve" page of the Properties of that once-Exploded,-now-Spline Curve From Law curve.

Here ya go, Alvin...

Henry H

Henry Hubich

Quote from: Alvin Gregorio on September 07, 2020, 03:42:57 AM
Quote from: Henry Hubich on September 06, 2020, 05:52:16 PM
...

Try this, Alvin: Copy the two lines shown in red below and paste into a new Word document for easy access. Then copy just the first line; then minimize Word.
...

Here are the two lines to copy-and-paste:

[1*exp(0.1*u)+0.5]*cos(u)
[1*exp(0.1*u)+0.5]*sin(u)


Thank You for that Henry.  It's appreciated-- I know that's a lot of typing to do.

Unfortunately, I don't have a version of TurboCAD that has the From Law tools.  Still stuck at V21.

What I was hoping for was something more like an explanation of what an engineer, mathematician, or physcist would be trying to achieve that the Law function/formula would produce.  I now have Wikipedia open to the "Golden Spiral" page, since you mentioned that; I think a study of that Wikipedia page should help (I'm always sure to donate my $5 or $10 annually to Wikipedia; I love Wikipedia!-- don't know where inquisitive minds would be without it and Google).
______
Question:  How does the Curve From Law tool, with those expressions, know when to stop the displayed curve?... what in the Law defines the "length" of the spiraled entity?

Alvin, that is determined by the value of "Umax."

Henry H

Henry Hubich

Alvin...

"If one graphically models a 2D Golden Spiral-- say a Fibonacci spiral-- then "pins" the innermost point and pulls up on the outermost point (such as Don demonstrated with his paperclip), does/will the spiral maintain its Golden_Spiral-ness?"

I haven't figured out how one can pin one end and pull up on the other--and wind up with simply a "stretched" object.

"Put another way-- If one creates a formula for the X,Y of a Golden Spiral, does adding a Z function to the formula result in the exact same spiral, when viewed from the top?  Without factoring in a k-factor-- a stretch factor-- I can't wrap my mind around how that would be possible."

Yes, it does.

Henry H

Alvin Gregorio

Thanks Henry.  For all those Replies.
I'm working on something; I like where it's progressing.  Definitely a brain exercise.

I have today, Labor Day, Off from work at the hotel project, so I'm using part of today to do some brain calisthenics and satisfy some TurboCAD itching.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

murray dickinson

A 2D polyline can be joined with a 3D polyline that isn't on the same plane and made into a 3D polyline, but although it can be "stretched  into 3D" with its vertices moved in the Z direction, that doesn't describe how points should be distributed in Z.   3D curves are 2D curves projected onto another surface that can be anything: plane, surface, primitive, revolve or other, and they'll all give differing results.  You could assume that if you're able to grab an endpoint and lift it, intermediate points between that vertex and the other endpoint should be equally distributed, but distributed in absolute terms from the reference point, along the length of a curve, interpolated or through control points?  In this discussion, because of Dean's requirements, spirals, involutes and similar are assumed to taper geometrically or exponentially to their origin, but they could as easily be projected onto a rippled surface, for example, or an offset body, or a 2D plane that isn't parallel to the spiral, that would presumably give unwanted or unbalanced results.