|
|
Am 23.07.2012 21:58, schrieb Chaanakya:
> "Chaanakya" <nomail@nomail> wrote:
>> Hey guys! I just had a quick question...
>>
>> I was trying to generate the graph of this function (in Cartesian coordinates):
>>
>> -z + 1.00003 = (3x^2 + 3y^2)/(200000)
>>
>> However, when I render the following code, nothing shows up except for the
>> plane:
...
>> isosurface {
>> function {
>> -y - ((3*pow(x,2) + 3*pow(z,2))/(200000)) + 1.00003
>> }
>> // contained_by { box { -2,2 } }
>> pigment {
>> color Red
>> }
>> }
...
> Even more strangely, when I use the equally valid function
>
> function {
> y + 3*pow(x,2)/200000 + 3*pow(z,2)/200000 - 1.00003
> }
>
> I get a cube. I think there's something fundamental about isosurfaces that I'm
> not understanding? That is, how should I convert the function z = -3x^2/200000
> - 3y^2/200000 + 1.00003 into an isosurface?
Do un-comment the "contained_by" line!
At x=0,z=0 you have y = 1.00003, which is outside the default
contained_by object (box{1,1}), and even at the maximum x and z
(x=1,z=1) you have y = 1.00000, which just barely touches the box.
I.e. the surface you defined is (for practical purposes) all outside
default container; so the inside of the default container is either
completely outside the isosurface (first version) so that you don't see
anything, or completely inside (second version) so that you simply see
the container's shape.
Post a reply to this message
|
|