CGPersia Forums
Release Blog CGPeers IRC Chat Register 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

Reply
 
Thread Tools Search this Thread
Old 09-04-2011   #1
Original Poster
Join Date: Sep 2010
Posts: 36
Thanks (Given): 39
Thanks (Received): 5
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   #2
MS6
MS6's Avatar
Join Date: Oct 2009
Posts: 1,686
Thanks (Given): 1317
Thanks (Received): 986
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.

Link(s):
 
^ That's just a circular spline.

To do that you could assume
j=i*8/200;

and fill that in Z
Z=0.05*i*8/200;

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 . - camotito thanked for this post
Old 09-04-2011   #3
dubadum
Join Date: Feb 2010
Posts: 1,268
Thanks (Given): 482
Thanks (Received): 929
good source for mathematical graphic programing with c4d

Link(s):
 
is Offline  
Reply With Quote
1 Thanks, 0 . - camotito thanked for this post
Old 09-04-2011   #4
camotito
Original Poster
Join Date: Sep 2010
Posts: 36
Thanks (Given): 39
Thanks (Received): 5
Thumbs up

Link(s):
 
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:
Link(s):
 
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:
Link(s):
 
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