ICE Topology and parametric equations

Here you can find ICE tutorials and learning material
User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 05 Jan 2012, 04:46

Startegy number 3

Test the divisor and clamp it to a small value of our choice (tolerance) when it reach near zero.

Figure deep_well4 provides the ice tree for this strategy.

Notice the compound node that test the divisor. The compound purpose is only to test if the divisor is near or equal to zero. Refer to the "division by zero and overflow" post earlier for a more detailed explaination.

In this startegy, we clamp the value of the divisor to the tolerance so that the divisor never reach zero.

Figure deep_well5 provides the inside of the divisor_test compound.

Notice that, for both "if" nodes, i changed the epsilon value to zero because the tolerance value provides the clamping factor to the surface, therefore we don't need an epsilon range for the test.

The tolerance was set to a very small amount.

Figure deep_well6 shows the result of the compound with different parameters to illustrate the versatility of this method.

You may have notice by now that I did not test the upper number of the fraction (divident). As the divident is a constant (-1), I don't need to test it. But if you are modifying the compound like the last figure so that you can modify the weight of the well, make sure you don't feed the formula with a number so large that Softimage will throw an error (overflow).

Hope this example help you understand the "division by zero" problem and provided you with some tools to cope with this problem.

Cheers!
Attachments
Deep_well4.jpg
Deep_well4.jpg (110.75 KiB) Viewed 4502 times
Deep_well5.jpg
Deep_well5.jpg (70.63 KiB) Viewed 4502 times
Deep_well6.jpg
Deep_well6.jpg (40.59 KiB) Viewed 4503 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 05 Jan 2012, 05:04

And here is the divisor_test compound.

Enjoy!
Attachments
Divisor_test.xsicompound
(9.28 KiB) Downloaded 193 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

Ramon
Posts: 111
Joined: 19 Aug 2010, 22:47

Re: ICE Topology and parametric equations

Post by Ramon » 05 Jan 2012, 08:25

gr8

User avatar
ActionArt
Posts: 853
Joined: 25 Nov 2010, 18:23
Location: Canada

Re: ICE Topology and parametric equations

Post by ActionArt » 05 Jan 2012, 12:05

Wow, you're really flying Daniel. I'm trying to keep up. You could put this into a book someday! Very enjoyable.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 08 Jan 2012, 21:19

Thank you Ramon and ActionArt for your kind word. I hope you are enjoying the adventure!
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 08 Jan 2012, 21:22

I will now be leaving Thiago formulas behind and let you, the readers, explore them further.

In order to keep the formula short, I will keep from repeating f(u,v), g(u,v) and h(u,v).
Just remember they are u and v equations associated with the x, y and z parameters!

Moving along to variations of the disk!
Last edited by Daniel Brassard on 09 Jan 2012, 02:48, edited 4 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 08 Jan 2012, 21:41

Disk Variations

If you remember the disk formula, it was:

x = v * sin(u)
y = 0
z = v * cos(u)

We already seen a variation of the disk with the cone, where we fed y with v.

x = v * sin(u)
y = v
z = v * cos(u)

But what else can we do with the disk? How about the square of v, what do we get?

The Paraboloid

x = v * sin(u)
y = v * v
z = v * cos(u)

u_start = 0
u_end = 2*PI .......... if you have not figured it out yet, 2*PI is the radian equivalent of 360 degrees!
v_start = 0
v_end = 1

Below is the Paraboloid ICE Tree and result!
Attachments
Paraboloid.jpg
Paraboloid.jpg (59.06 KiB) Viewed 3353 times
Paraboloid2.jpg
Paraboloid2.jpg (80.87 KiB) Viewed 3353 times
Last edited by Daniel Brassard on 09 Jan 2012, 02:49, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 08 Jan 2012, 22:20

Disk Helicoid

This simple form can been seen has rotating and moving up (or down) the disk around the y axis. We use a height value to displace the disk up during the rotation, creating the helix. The u parameter is fed to the three components to create the helix.

The parameters of the Helicoid are:

x = v * sin(u)
y = height * u
z = v * cos(u)

where

u_start = 0
u_end = 4*PI (you can do as many rotation as you wish, even animate it)
v_start = 0
v_end = 3
height = .1

The helicoid ICE tree and result is as follow. Notice that in the last figure (Helicoid3), we changed some parameter's values to get a ramp like shape.
Attachments
Helicoid.jpg
Helicoid.jpg (64.58 KiB) Viewed 3348 times
Helicoid2.jpg
Helicoid2.jpg (73.21 KiB) Viewed 3349 times
Helicoid3.jpg
Helicoid3.jpg (44.32 KiB) Viewed 3349 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 08 Jan 2012, 22:38

Disk Wiggle wave

In the next example, the vertical component of the disk is scaled by a cosine function to give the disk a kind of "wiggle wave" similar to the 16th century collars that Aristocrats used to wear!

The parameters are:

x = v * sin(u)
y = (v * cos(wave*u) / 2) /2
z = v * cos(u)

with

u_start = 0
u_end = 2*PI
v_start = 0
v_end = 1
wave = 6 (control the amount of wiggle waves on the disk)

Below is the ICE Tree and result. The last figure shows a variation (16Th century collars anyone).
Attachments
wiggle.jpg
wiggle.jpg (72 KiB) Viewed 3283 times
wiggle2.jpg
wiggle2.jpg (72.52 KiB) Viewed 3283 times
wiggle3.jpg
wiggle3.jpg (50.88 KiB) Viewed 3283 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 08 Jan 2012, 23:01

The same technique used for the cone, disk paraboloid and disk helicoid can be generalised to a method that make a "surface of revolution".

A Surface of revolution is a surface that rotate around an axis (y axis in our case).

Equations for "Surface of revolution" are expressed as follows:

y = g(v) ..... Just set the height value to be some function of v for the y axis

As an example, let's use the cosine function to drive v in the y axis:

x = v * sin(u)
y = cos(v)
z = v * cos(u)

with

u_start = 0
u_end = 2*PI
v_start = 0
v_end = 10*PI

The ICE Tree and result is as follows.
Attachments
Disk_Cos_Wave.jpg
Disk_Cos_Wave.jpg (62.27 KiB) Viewed 3280 times
Disk_Cos_Wave2.jpg
Disk_Cos_Wave2.jpg (118.88 KiB) Viewed 3280 times
Last edited by Daniel Brassard on 08 Jan 2012, 23:24, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 08 Jan 2012, 23:23

Here is an other interesting variation using u and v to create spiral wave patterns. The parameter u is multiplied by an integer value to make the surface continuous.

The parameters are:

x = v * sin(u)
y = Cos((Spiral * u ) +v)
z = v * cos(u)

with

u_start = 0
u_end = 2*PI
v_start = 0
v_end = 10*PI
Spiral is an integer value driving the amount of waves spiraling around the y axis

The ICE Tree and result is as follows.
Attachments
Disk_Spiral_Wave.jpg
Disk_Spiral_Wave.jpg (70.36 KiB) Viewed 3278 times
Disk_Spiral_Wave2.jpg
Disk_Spiral_Wave2.jpg (121.82 KiB) Viewed 3278 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 09 Jan 2012, 00:15

There are many types of surface of revolution and you can switch axis by just flipping the x, y or z port of the scalar to vector node in our ICE tree.

The cylinder is an other "surface of revolution" (a line describing a circle around the y axis)

Let's see a variation of the cylinder.

Cylinder Lathe

The original cylinder equations were:

x = r * cos(u)
y = v
z = r * Sin(u)

with

r = the radius of the cylinder

What if we were to scale the circles at each level of the cylinder by a function of v?

We would get a lathe surface.

Here is a variation of the cylinder where the radius is affected by a cosine function:

r = (Radius + cos(Wave*v)) / 5
x = r * cos(u)
y = v
z = r * Sin(u)

Radius control the size of the disk circle of the cylinder
Wave is a multiplier inside the cosine function that control the amount of wave along the y axis of the cylinder

The ICE Tree and resulting surface is as follows.
Attachments
Cylinder_Lathe.jpg
Cylinder_Lathe.jpg (64.89 KiB) Viewed 3275 times
Cylinder_Lathe2.jpg
Cylinder_Lathe2.jpg (68.49 KiB) Viewed 3275 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 09 Jan 2012, 00:31

The Stereographic Sphere (Riemann Sphere)

Here is an interesting parametric surface. This sphere parameters are based on the stereographic projection, which map the points of the sphere on the complex plane. The gap in the sphere cannot be closed without the u and v parameters extending to a very large number (infinity). If you want to close it, you will have to do it manually.

This surface is useful in constructing baskets, necklaces and domes.

The parameter are:

x = 2 * v / (1 + u*u + v*v)
y = (u*u + v*v - 1) / (1 + u*u + v*v)
z = 2 * u / (1 + u*u + v*v)

with

u_start = -10
u_end = 10
v_start = -10
v_end = 10

The ICE Tree and parametric surface is as follow. The last figure (Sphere_Stereographis3) shows you the necklace form with the parameters to achieve it. Enjoy!
Attachments
Sphere_Stereographic.jpg
Sphere_Stereographic.jpg (74.31 KiB) Viewed 4133 times
Sphere_Stereographic2.jpg
Sphere_Stereographic2.jpg (82.1 KiB) Viewed 4133 times
Sphere_Stereographic3.jpg
Sphere_Stereographic3.jpg (29.54 KiB) Viewed 4133 times
Last edited by Daniel Brassard on 11 Jan 2012, 03:00, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Memag
Posts: 339
Joined: 09 Aug 2010, 01:37
Location: Tits

Re: ICE Topology and parametric equations

Post by Memag » 09 Jan 2012, 00:59

Wow!
Insanely awesome for (below)average 3d user like me.
I just wish these could be put in "get primitive" menu for quick use.
Please continue.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology and parametric equations

Post by Daniel Brassard » 09 Jan 2012, 02:44

Thanks Memag.

The more I am getting into this, the more I am thinking of packaging all the surfaces into a Topo pack. Maybe I'll do that after I finish with this thread!

Sort of thank you and support to si-community!
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
ActionArt
Posts: 853
Joined: 25 Nov 2010, 18:23
Location: Canada

Re: ICE Topology and parametric equations

Post by ActionArt » 09 Jan 2012, 03:45

That would be a VERY good idea. I think it would be quite useful and give a good starting point for those of us that are a little math challenged to build onto. Would be much appreciated if you decide to do that. ^:)^

In production sometimes there isn't as much time to experiment as I'd like so a starting point is very helpful. I think it would be very popular.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests