POV-Ray : Newsgroups : povray.general : mesh help : mesh help Server Time
4 Nov 2024 23:20:31 EST (-0500)
  mesh help  
From: Jettero Heller
Date: 17 Aug 2003 16:00:46
Message: <slrnbjvnlb.msi.povfan@corky.voltar-confed.org>
I hope I'm doing something stupid so I can get past this and move
on with my project.  I have included some sources so you can
catch my drift...

When c=1, you'll see a cute little scene with a pyramid cut
across by a thick plane.  Excellent.  Almost what I want.  Then,
when c=2, you'll see me cutting a hole out of the plane.  Pretty
predictable stuff.

And finally, when c=3, I'm intending to cut a rhomboid thingy out
of the plane, but instead I'm getting the rhomboid as if I'd
accidentally used intersection instead of difference.

How can I cut out the rhomboid instead of ... whatever that was.

Jet


// test.pov:
#version 3.5;

#declare c = 1;

camera {
    location <-3, -1, 5>
    look_at  <5, 1, 5>
}

light_source { <-3, -1, 5> color rgb 1 }
light_source { <7, 7, 7> color rgb 1 }

object {
    #if( c = 1 ) 
        union {
    #else
        difference {
    #end
        box { <2, 0.7, 2> <8, 0.65, 8> }
        #if( c = 2 ) 
            cylinder { <5, -6, 5> <5, 6, 5> 1 }
        #else
            mesh {
                triangle { <3, 0, 3> <3, 0, 7> <5, 1, 5> }
                triangle { <3, 0, 7> <7, 0, 7> <5, 1, 5> }
                triangle { <7, 0, 7> <7, 0, 3> <5, 1, 5> }
                triangle { <7, 0, 3> <3, 0, 3> <5, 1, 5> }

                triangle { <7, 0, 7> <3, 0, 3> <7, 0, 3> }
                triangle { <7, 0, 7> <3, 0, 3> <3, 0, 7> }

                inside_vector <1, 2, 3>
            }
        #end
    }
    texture {
        finish { phong 0.55 crand 0.0 
            specular 0.55 reflection 0.51 ambient 0.5 } 
        pigment { color rgb 0.7 }
    }
}

-- 
If riding in an airplane is flying, then riding in a boat is swimming.
41 jumps, 8.9 minutes of freefall, 19.2 ff vertical miles.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.