grt-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[grt-talk] Rotate-bug and normal (?) accuracy problem


From: Nikodemus Siivola
Subject: [grt-talk] Rotate-bug and normal (?) accuracy problem
Date: Tue, 22 Apr 2003 15:07:16 +0300 (EEST)

When rotating (at least around Y-axis) a rotation of 90 or 270 degrees
causes wierd things to happen. This applies to both spheres and boxes, so
it seems to be a problem with the transformation, but something
*especially* funky seem to be going on with boxes...

Also, when camera is farther away spheres seem to be suffering from a
accuracy problem, probably due to normals, but the surface shadowing itself
is also a possibility. Or maybe we a missing the first surface. I doubt the
last one, though.

There is also a seeming problem with box egdes, but I think this is just
a barest glimpse of the side facing the centre: see how the color of the
dots changes depending on whether the side the dots are on is in shadow
or not. An aliasing problem, really. (I hope!)

Just discovered these. Since I'll be fairly busy this week it'll be a
while before I have time to look into these, so if you happen to track
either of these down... ,)

The code below illustrates the problem.

Cheers,

  -- Nikodemus

--
(use-package :grt)
(new-scene)
(set-background-color (rgb 0.6 0.6 1.0))
(scene (light))

(do ((r 0 (+ (/ 360 12) r)))
    ((= r 360))
  (let ((c (make-pigment :solid (case r
                                  ((0 180) +blue+)
                                  (90 +red+)
                                  (270 +green+)
                                  (otherwise +white+)))))
  (scene (sphere 1.0 '(0 0 6)
                 :transform (rotate-y r)
                 :pigment c))
  (scene (box '(-0.5 0 2.5) '(0.5 1 3.5)
              :transform (rotate-y r)
              :pigment c))))


(render :camera (camera :location '(0 60 0)
                        :look-at '(0 0 0)
                        :sky +Z+)
        :width 300
        :height 240
        :keep-open t
        :screen t






reply via email to

[Prev in Thread] Current Thread [Next in Thread]