ICE Topology and parametric equations
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
That is it for tonight ... next time The Torus!
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math inside!)
The Torus (hum ... Donuts!)
The torus is formed by rotating a circle that is offset from the origin. The torus is controled by two radius: a large radius that control the size of the offset and a small radius that control the thickness of the ring.
The torus equations are:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Cos(v)))
y = g(u,v) = R1 * Sin(v)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Cos(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
The ICE Tree and result is as below.
The torus is formed by rotating a circle that is offset from the origin. The torus is controled by two radius: a large radius that control the size of the offset and a small radius that control the thickness of the ring.
The torus equations are:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Cos(v)))
y = g(u,v) = R1 * Sin(v)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Cos(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
The ICE Tree and result is as below.
- Attachments
-
- Torus.jpg (72.73 KiB) Viewed 3187 times
-
- Torus2.jpg (82.19 KiB) Viewed 3187 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
The Torus second mapping.
Like the sphere, the torus has a second mapping as follows:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Sin(v)))
y = g(u,v) = R1 * Cos(v)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Sin(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
The ICE Tree and result is as below.
Like the sphere, the torus has a second mapping as follows:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Sin(v)))
y = g(u,v) = R1 * Cos(v)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Sin(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
The ICE Tree and result is as below.
- Attachments
-
- Torus3.jpg (71.08 KiB) Viewed 3630 times
-
- Torus4.jpg (86.42 KiB) Viewed 3630 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
Torus variations
Also like the sphere, we can modify the equations to control the height, width or depth by multiplying each equations with a scalar.
The torus equations are now:
x = f(u,v) = a * (Cos(u) * ( R0 + (R1 * Cos(v))))
y = g(u,v) = b * (R1 * Sin(v))
z = h(u,v) = c * (Sin(u) * (R0 + ( R1 * Cos(v))))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
a, b and c are scalars to control the width, height and depth of the torus.
Below is a modification of the ICE tree in x,y and z with a stretch in height of the torus as an example.
Also like the sphere, we can modify the equations to control the height, width or depth by multiplying each equations with a scalar.
The torus equations are now:
x = f(u,v) = a * (Cos(u) * ( R0 + (R1 * Cos(v))))
y = g(u,v) = b * (R1 * Sin(v))
z = h(u,v) = c * (Sin(u) * (R0 + ( R1 * Cos(v))))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
a, b and c are scalars to control the width, height and depth of the torus.
Below is a modification of the ICE tree in x,y and z with a stretch in height of the torus as an example.
- Attachments
-
- Torus5.jpg (77.33 KiB) Viewed 3629 times
-
- Torus6.jpg (84.49 KiB) Viewed 3629 times
Last edited by Daniel Brassard on 11 Dec 2011, 04:47, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
The Helical Torus
By adding a component to the y axis equation, we can change the torus to a spring type surface.
The equations are:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Cos(v)))
y = g(u,v) = Stretch * u + (R1 * Sin(v)) (note the modification)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Cos(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 4*PI
V_Start = 0
V_End - 2*PI
Stretch = 1
The ICE Tree and result is as below.
By adding a component to the y axis equation, we can change the torus to a spring type surface.
The equations are:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Cos(v)))
y = g(u,v) = Stretch * u + (R1 * Sin(v)) (note the modification)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Cos(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 4*PI
V_Start = 0
V_End - 2*PI
Stretch = 1
The ICE Tree and result is as below.
- Attachments
-
- Helical-Torus.jpg (72.62 KiB) Viewed 3628 times
-
- Helical-Torus2.jpg (79.66 KiB) Viewed 3628 times
Last edited by Daniel Brassard on 11 Dec 2011, 04:44, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
The Spiral Helical Torus (Shell)
An other of the Torus variation, this time we also control the size of the ring as its spiral around the y axis creating a Shell type surface.
The equations are:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Cos(v)))
y = g(u,v) = u* (R1 * Sin(v)) - Stretch * u (note the modification)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Cos(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 4*PI
V_Start = 0
V_End - 2*PI
Stretch = 1.5
The ICE Tree and result is as below.
An other of the Torus variation, this time we also control the size of the ring as its spiral around the y axis creating a Shell type surface.
The equations are:
x = f(u,v) = Cos(u) * ( R0 + (R1 * Cos(v)))
y = g(u,v) = u* (R1 * Sin(v)) - Stretch * u (note the modification)
z = h(u,v) = Sin(u) * (R0 + ( R1 * Cos(v)))
where
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 4*PI
V_Start = 0
V_End - 2*PI
Stretch = 1.5
The ICE Tree and result is as below.
- Attachments
-
- Torus_Shell.jpg (76.68 KiB) Viewed 3626 times
-
- Torus_Shell2.jpg (82.86 KiB) Viewed 3626 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
The SuperTorus (Supertoroid)
Using the formulas provided by Paul Bourke on his website, we recreate the SuperTorus.
Basically, we are going to modify the torus by putting the cos and sin parateters in power of an exponent.
This will modify the surface in various ways based on the exponent chosen.
The supertorus equations are:
x = f(u,v) = exp(n1, Cos(u)) * ( R0 + ( R1 * exp(n2, Cos(v))))
y = g(u,v) = R1 * exp(n2, Sin(v))
z = h(u,v) = exp(n1, Sin(u)) * ( R0 + ( R1 * exp(n2, Cos(v))))
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
n1 and n2 can adopt the values illustrated on the table from Paul Bourke website:
http://paulbourke.net/geometry/torus/
Here is the ICE tree and the result. Also attached is the SuperTorus compound for experimentation. Enjoy!
Using the formulas provided by Paul Bourke on his website, we recreate the SuperTorus.
Basically, we are going to modify the torus by putting the cos and sin parateters in power of an exponent.
This will modify the surface in various ways based on the exponent chosen.
The supertorus equations are:
x = f(u,v) = exp(n1, Cos(u)) * ( R0 + ( R1 * exp(n2, Cos(v))))
y = g(u,v) = R1 * exp(n2, Sin(v))
z = h(u,v) = exp(n1, Sin(u)) * ( R0 + ( R1 * exp(n2, Cos(v))))
R0 is the large radius = 1
R1 is the small radius = 0.25
U_start = 0
U_End = 2*PI
V_Start = 0
V_End - 2*PI
n1 and n2 can adopt the values illustrated on the table from Paul Bourke website:
http://paulbourke.net/geometry/torus/
Here is the ICE tree and the result. Also attached is the SuperTorus compound for experimentation. Enjoy!
- Attachments
-
- SuperTorus.xsicompound
- (126.05 KiB) Downloaded 146 times
-
- Super_Torus.jpg (74.96 KiB) Viewed 3599 times
-
- Super_Torus2.jpg (86.99 KiB) Viewed 3599 times
Last edited by Daniel Brassard on 10 Jan 2012, 18:25, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
A word of caution about Exponent
You will have to be carefull when experimeting with exponent. There are situation when the exponent will give you errors:
If the magnitude of the result is so large that it cannot be represented,
If the base is negative and the exponent is not an integer value, or
If the base is zero and the exponent is negative.
One example, is the square root of a negative number will result in an imaginary number.
http://www.mathsisfun.com/numbers/imagi ... mbers.html
Softimage will not be able to represent this number and will throw an error.
I have created a compound to convert imaginary numbers and to speed up calculation of zero or very small base so that they can be represented by Softimage. Attached is the compound. I have used this compound in the Supertorus and we will be using it again for other surfaces.
Cheers!
You will have to be carefull when experimeting with exponent. There are situation when the exponent will give you errors:
If the magnitude of the result is so large that it cannot be represented,
If the base is negative and the exponent is not an integer value, or
If the base is zero and the exponent is negative.
One example, is the square root of a negative number will result in an imaginary number.
http://www.mathsisfun.com/numbers/imagi ... mbers.html
Softimage will not be able to represent this number and will throw an error.
I have created a compound to convert imaginary numbers and to speed up calculation of zero or very small base so that they can be represented by Softimage. Attached is the compound. I have used this compound in the Supertorus and we will be using it again for other surfaces.
Cheers!
- Attachments
-
- Exponent_Converter.jpg (63.93 KiB) Viewed 3598 times
-
- Exponent_converter.xsicompound
- (10.97 KiB) Downloaded 137 times
Last edited by Daniel Brassard on 11 Dec 2011, 05:22, edited 2 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations (Warning math here!)
Well that is it for me tonight.
Before I go, here is the table of exponents for the Supertorus from Paul Bourke website as reference.
[edit] For those who are familiar with MODO, you may have recognised their torus implementation ... Enough said! ;)
Until next time, happy experimenting!
Before I go, here is the table of exponents for the Supertorus from Paul Bourke website as reference.
[edit] For those who are familiar with MODO, you may have recognised their torus implementation ... Enough said! ;)
Until next time, happy experimenting!
- Attachments
-
- supertoroid1.gif (82.29 KiB) Viewed 3595 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations
Holes and Boundaries
You may have notice by now that the shapes created so far are open shapes for a good reason, we are twisting a flat grid. As an example, if you look at the cylinder, it is not capped or closed as indicated by the blue line in the middle, top and bottom of the shape.
There are many ways to close these shapes, depending on what your end result will be:
You can use the cap hole tool that come with 2012 SAP.
You can create your own capping tool using a variety of ICE nodes such as the merge vertices and collapse edge tool.
Me I prefer the old fation way, using tools already available in Softimage:
I merge vertices using the "Weld Boundary Point/Edges" with a very small distance threshold of .001
then
I select the edge loop of the hole I want to cap, duplicate the components (ctrl+D) than collapse the components (ctrl+delete)
or
I close boundaries using the "Bridge Boundary Point / Edges" operator.
That way I keep control of the final shape. Be aware that, with any techniques you use, make sure you get clean results and modify as needed. Check you shape in all angles, and correct if necessary.
You may have notice by now that the shapes created so far are open shapes for a good reason, we are twisting a flat grid. As an example, if you look at the cylinder, it is not capped or closed as indicated by the blue line in the middle, top and bottom of the shape.
There are many ways to close these shapes, depending on what your end result will be:
You can use the cap hole tool that come with 2012 SAP.
You can create your own capping tool using a variety of ICE nodes such as the merge vertices and collapse edge tool.
Me I prefer the old fation way, using tools already available in Softimage:
I merge vertices using the "Weld Boundary Point/Edges" with a very small distance threshold of .001
then
I select the edge loop of the hole I want to cap, duplicate the components (ctrl+D) than collapse the components (ctrl+delete)
or
I close boundaries using the "Bridge Boundary Point / Edges" operator.
That way I keep control of the final shape. Be aware that, with any techniques you use, make sure you get clean results and modify as needed. Check you shape in all angles, and correct if necessary.
- Attachments
-
- Cap_Hole_Boundary.jpg (57.96 KiB) Viewed 3467 times
-
- Cap_Hole_Boundary2.jpg (49.26 KiB) Viewed 3467 times
Last edited by Daniel Brassard on 01 Jan 2012, 03:08, edited 2 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations
A while back, Thiago Costa was using ICE to deform a grid to visualize the graph of a function.
If you are interested, you can found Thiago original thread at:
http://thiagocosta.net/?p=157
We can do the same thing with our Parametric_Sandbox compound. Let's experiment with the grid.
If you are interested, you can found Thiago original thread at:
http://thiagocosta.net/?p=157
We can do the same thing with our Parametric_Sandbox compound. Let's experiment with the grid.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations
Radial Wave
Here is an example showing radial waves. The distance from the origin is used as an input to a cosine function.
The parameters for this function are:
r = sqrt(u*u + v*v)
x = f(u,v) = u
y = g(u,v) = Cos(r)
z = h(u,v) = v
U_start = -15
U_End = 15
V_Start = -15
V_End - 15
Here is the ICE tree and the result.
We can create a spreading waves by getting the time value from a "frame" node and adding it to the the "r" value before the cosine node.
Here is an example showing radial waves. The distance from the origin is used as an input to a cosine function.
The parameters for this function are:
r = sqrt(u*u + v*v)
x = f(u,v) = u
y = g(u,v) = Cos(r)
z = h(u,v) = v
U_start = -15
U_End = 15
V_Start = -15
V_End - 15
Here is the ICE tree and the result.
We can create a spreading waves by getting the time value from a "frame" node and adding it to the the "r" value before the cosine node.
- Attachments
-
- Radial_Wave.jpg (61.28 KiB) Viewed 4753 times
-
- Radial_Wave2.jpg (116.63 KiB) Viewed 4753 times
Last edited by Daniel Brassard on 01 Jan 2012, 21:15, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations
In Thiago Costa's blogpost, we see at the beginning a lot of formulas. How do we translate his formulas for use in the Parametric Sandbox?
Easy: his x = u, and his z = v
For example, Thiago first formula is x * z.
For the Parametric Sandbox, the parameters become:
x = f(u,v) = u
y = g(u,v) = (x * z) = (u * v)
z = h(u,v) = v
u_start = -1
u_end = 1
v_start = -1
v_end = 1
Because Thiago is driving a grid to deform with his formulas, we only need to convert his formulas to u and v equivalent and feed the formula result to the y parameter to get the same results has he did.
So for the example above we get the ICE tree and result below.
Now check his second and third formulas .... look familiar?
x^2 + z^2
x^2 – z^2
That's right! Hyperbolic and Elliptic paraboloid!
Easy: his x = u, and his z = v
For example, Thiago first formula is x * z.
For the Parametric Sandbox, the parameters become:
x = f(u,v) = u
y = g(u,v) = (x * z) = (u * v)
z = h(u,v) = v
u_start = -1
u_end = 1
v_start = -1
v_end = 1
Because Thiago is driving a grid to deform with his formulas, we only need to convert his formulas to u and v equivalent and feed the formula result to the y parameter to get the same results has he did.
So for the example above we get the ICE tree and result below.
Now check his second and third formulas .... look familiar?
x^2 + z^2
x^2 – z^2
That's right! Hyperbolic and Elliptic paraboloid!
- Attachments
-
- Saddle.jpg (53.74 KiB) Viewed 4747 times
-
- Saddle2.jpg (63.94 KiB) Viewed 4747 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations
Here is a few of Thiago formulas in Parametric Sandbox ICE tree variations:
x^2 * z^2 (Grid_Elliptic_var1)
x^3 + z^3 (Grid_Elliptic_var2)
sin(x) (Grid_Sine_wave)
x^2 * z^2 (Grid_Elliptic_var1)
x^3 + z^3 (Grid_Elliptic_var2)
sin(x) (Grid_Sine_wave)
- Attachments
-
- Grid_Elliptic_var1.jpg (88.54 KiB) Viewed 4714 times
-
- Grid_Elliptic_var2.jpg (82.39 KiB) Viewed 4714 times
-
- Grid_Sine_wave.jpg (102.77 KiB) Viewed 4714 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations
And a few more:
cos(x) + cos(z) ^ 2 (Grid_Cosine_wave)
cos(x^2 + z^2) (Grid_Radial_wave2)
sin(x^2 + z^2) (Grid_Radial_wave3)
cos(x) + cos(z) ^ 2 (Grid_Cosine_wave)
cos(x^2 + z^2) (Grid_Radial_wave2)
sin(x^2 + z^2) (Grid_Radial_wave3)
- Attachments
-
- Grid_Cosine_wave.jpg (82.34 KiB) Viewed 4713 times
-
- Grid_radial_wave2.jpg (94.76 KiB) Viewed 4713 times
-
- Grid_Radial_Wave3.jpg (95.06 KiB) Viewed 4713 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: ICE Topology and parametric equations
If you looked at Thiago formulas, you will see this form:
|x|
These "brakets" are not paranthesis, they are the mathematical representation of the "absolute"
so |x| is to be read "absolute of x"
What do absolute do? it force the number to be positive!
if x is positive, keep it positive
if x is below zero (negative), change the sign to make x positive.
Why we use absolute?
As I explained before, some numbers cannot be represented by Softimage like those that are imaginary (sqrt(-x))!
By making the number always positive, we make sure Softimage is able to calculate the number and put a corresponding point on the screen.
For example, In Thiago formula
|cos(x) + cos(z)| ^ (1/2)
He is asking to do the square root of the sum of two cosines. As cosines varies from positive numbers to negative numbers, if we do not force the result to remain positive with the "absolute node", we would be dealing with a lot of imaginary numbers which could not be represented by Softimage.
the square root of the absolute of cos(x)+cos(z) convert imaginary numbers to numbers that can be represented.
Keep the absolute node in mind when playing with formulas. This is one weapon to remember.
Below is Thiago formula |cos(x) + cos(z)| ^ (1/2) in Parametric Sandbox ICE representation!
|x|
These "brakets" are not paranthesis, they are the mathematical representation of the "absolute"
so |x| is to be read "absolute of x"
What do absolute do? it force the number to be positive!
if x is positive, keep it positive
if x is below zero (negative), change the sign to make x positive.
Why we use absolute?
As I explained before, some numbers cannot be represented by Softimage like those that are imaginary (sqrt(-x))!
By making the number always positive, we make sure Softimage is able to calculate the number and put a corresponding point on the screen.
For example, In Thiago formula
|cos(x) + cos(z)| ^ (1/2)
He is asking to do the square root of the sum of two cosines. As cosines varies from positive numbers to negative numbers, if we do not force the result to remain positive with the "absolute node", we would be dealing with a lot of imaginary numbers which could not be represented by Softimage.
the square root of the absolute of cos(x)+cos(z) convert imaginary numbers to numbers that can be represented.
Keep the absolute node in mind when playing with formulas. This is one weapon to remember.
Below is Thiago formula |cos(x) + cos(z)| ^ (1/2) in Parametric Sandbox ICE representation!
- Attachments
-
- Grid_Cosine_Pillow.jpg (123.62 KiB) Viewed 4711 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Who is online
Users browsing this forum: No registered users and 49 guests