Hello List!
I would like to add more shapes to this function in GLSL. I found in one
composition from Toneburst that he used ' return (SphereTorus == 0.0) ?
qSphere : qTorus; ' to choose from diferent equations but now I would like
to add a third and forth equation but my logical thoughts aren't working. so
I would just add ':' as you see in this example. So my question is how can I
add more than two equations?
vec3 functionShape(in float theta,in float phi)
{
vec3 qSphere;
qSphere.x = sin(phi) * cos(theta);
qSphere.y = cos(phi);
qSphere.z = sin(phi) * sin(theta);
vec3 qTorus;
qTorus.x = radio * cos(theta);
qTorus.y = largo * cos(phi);
qTorus.z = radio * sin(theta);
vec3 qSquare;
qSquare.x = radio * cos(theta);
qSquare.y = largo * cos(phi);
qSquare.z = radio * r * sin(theta);
* return (SphereTorus == 0.0) ? qSphere : qTorus : qSquare;*
}
Thank you!!!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]