CGPersia Forums
Release Blog CGPeers IRC Chat FAQ
Go Back   CGPersia Forums > CGPersia Home > General CG Help & Support
Reload this Page C4D make geometry from 3d parametric formulas
General CG Help & Support Baffled by something? Ask for support here! NOT FOR SITE ISSUES OR REQUESTS

Thread Tools Search this Thread
Old 09-04-2011, 02:44:02 PM   #1
Original Poster
Join Date: Sep 2010
Posts: 38
Thanks (Given): 40
Thanks (Received): 6
Default C4D make geometry from 3d parametric formulas

Hello all, as the title says, I'm looking for some pointers in how to generate geometry from parametric formulas.

Of course I tried the Formula Object, but the equations that I have have at least two ranges of values (making tMin and tMax only half of what i need).

Do I need to look into learning Python to generate it?

For example, one of these objects is like a donut/torus (idiotic to use a formula when it's a primitive object, but for the sake of simplicity it's what I'll use).

My textbook gives me the ranges (we'll call them i and j):
i := 0, 1 ... 200
j := 0, 1 ... 8

I then have 3 equations, one for X, Y and Z.

X i, j := cos (0.01 * i * pi)
Y i, j := 1.1*sin(0.01 * i * pi)
Z i, j := 0.05 * j

Any ideas or pointers here would be fantastic. I'm not much of a coder, and its been quite some time since I've been up to any maths revolving plotting - saying I'm rusty is an understatement.
is Offline  
Reply With Quote
Old 09-04-2011, 05:45:39 PM   #2
MS6's Avatar
Join Date: Oct 2009
Posts: 1,811
Thanks (Given): 1629
Thanks (Received): 1069
you could replace j by a formula based on i.
but you probably don't get around some coding.
What formula object are you talking about? Formula spline or formula deformer?
As you mentioned probably formula spline primitive. How do you want to make a torus from a spline?
Of course you can sweep a circle along a circle but that doesn't seem like what you're talking about.

^ That's just a circular spline.

To do that you could assume

and fill that in Z

But to create a real torus you need a script that creates your points and based on that edges and polys (and takes care about normal direction, duplicate points, triangulation). Coffee, C or Python. I suggest Python.
is Offline  
Reply With Quote
1 Thanks, 0 Dislike - camotito thanked for this post
Old 09-04-2011, 05:49:28 PM   #3
Join Date: Feb 2010
Posts: 3,133
Thanks (Given): 1796
Thanks (Received): 2954
good source for mathematical graphic programing with c4d

is Online  
Reply With Quote
1 Thanks, 0 Dislike - camotito thanked for this post
Old 09-04-2011, 06:39:12 PM   #4
Original Poster
Join Date: Sep 2010
Posts: 38
Thanks (Given): 40
Thanks (Received): 6
Thumbs up

Hey MS6, thanks for the input.
At first I was thinking of doing a sweep actually, and yeah, I was talking about the Formula Spline Primitive. I also considered the deformer, but it seemed less sophisticated and limited than making the spline.

I think it would be more clear if I showed you what I'm working with.
Below is the page with the illustration and formula for the torus-like object:
But like I said, I was starting with that one to get an idea of what I should be expecting, something more along the lines of this:
Now, like for this one, this would be very easy to make using the helix spline primitive and a spline wrap, but the purpose of this project is to use the formulas provided to generate the geometry.

You recommend Python so I will look into it, atm I found some tutorials on cgrebel about learning Python for C4D, anywhere else you recommend me to check into?
Also, what approach should I take for something like this, coding-wise?
is Offline  
Reply With Quote