[Tutor] parsing?

Ingo seedseven@home.nl
Thu, 28 Jun 2001 20:59:15 +0200


I'm tying to make something that can read some values and functions from a file 
and then use these to create a parametric surface in triangles to be rendered 
by POV-Ray. The triangle generation isn't the problem, but reading the 
functions into the program. 

If I have a line read from a textfile that says:

u=2

how do I manage to make a value u=2 available to the program, that read the 
textfile, so it can do some calculations with it? 

The same, but now for a function:

Function Fx(u,v,R)=R*sin(u)*cos(v)

How do I make the above available in the program as if the below was part of it?

def Fx (u,v,R):
    x=R*sin(u)*cos(v)
    return x


TIA,

Ingo

-- 
Photography:  http://members.home.nl/ingoogni/
POV-Ray:  http://members.home.nl/seed7/