POV-Ray : Newsgroups : povray.binaries.images : smooth height_fields Server Time
16 Aug 2024 16:20:47 EDT (-0400)
  smooth height_fields (Message 31 to 32 of 32)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Christoph Hormann
Subject: Re: smooth height_fields
Date: 5 Mar 2002 07:07:09
Message: <3C84B4E8.72BDCFBB@gmx.de>
Zeger Knaepen wrote:
> 
> > BTW, i wonder how much slower it would be not to store the normals and
> > calculate them from the vertices during trace.  This could save a lot of
> > space when dealing with large heightfields.
> Actually, after a quick look at the code, I had the idea that that's how it's
> done now...
> But it was a *very* quick look! :)
> 

The normals for all vertices are calculated in 'smooth_height_field()' in
hfield.c, the code in 'HField_Normal()' only interpolates these normals.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 21 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Zeger Knaepen
Subject: Re: smooth height_fields
Date: 5 Mar 2002 08:07:38
Message: <3c84c31a@news.povray.org>
> The normals for all vertices are calculated in 'smooth_height_field()' in
> hfield.c, the code in 'HField_Normal()' only interpolates these normals.
oh, I see :)

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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