POV-Ray : Newsgroups : povray.general : Unexpected results with prisms : Unexpected results with prisms Server Time
31 Jul 2024 22:09:17 EDT (-0400)
  Unexpected results with prisms  
From: clum
Date: 25 Aug 2006 03:35:00
Message: <web.44eea77dd88dd40f9bc721f00@news.povray.org>
I've been doing various things with conic-swept prisms, and I've been
getting some very unexpected results. I tried reducing my problem to a
simpler scene file, and though it did not come up with exactly the same
unexpected results as before, it's still not working as I expected. Here is
a simple example. With a normal perspective camera, it is a nice square
pyramid. With a directly overhead orthogonal view, however, the whole thing
appears green. Though I am not sure, from my previous experimentation I
believe that only the base is appearing, and not the walls of the pyramid,
similar to results one receives when using back-face culling with reversed
normals.

//camera {location <5, 7, 2> look_at <1,0,0>}
camera {orthographic location <0, 10, 0> look_at <0, 0, 0> up x*3 right z*4}
light_source {<5,5,5> rgb 1}

difference {
    prism {
        conic_sweep
        linear_spline
        0, 1, 5,
        <-1, 1>, <1, 1>, <1, -1>, <-1, -1>, <-1, 1>
        scale <1, -1, 1>
        translate y*1
    }

    pigment {
        gradient y

        color_map {
        [0.0 color <0, 1, 0> ]
        [1 color <0, 0, 1> ]
        }
        scale y*.2
    }
    finish {ambient .5}
}


Post a reply to this message

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