POV-Ray : Newsgroups : povray.general : Most efficient way to code a hemisphere (lathe.inc) : Most efficient way to code a hemisphere (lathe.inc) Server Time
29 Jul 2024 14:11:27 EDT (-0400)
  Most efficient way to code a hemisphere (lathe.inc)  
From: gregjohn
Date: 26 Feb 2011 21:10:00
Message: <web.4d69b2033996fba34d207310@news.povray.org>
Hi. I was trying to find the most efficient way to code a mesh for a perfect
hemisphere.  I could probably do it if I were to break out a while loop with a
couple thousand entries in the spline based on trig functions.  But it would
really help to know the simplest way to define one.  So far I haven't hit on it
with quadratic spline, supposed I will next try cubic.

TIA for any help.


#version 3.5;
#include "lathe.inc"

global_settings {assumed_gamma 1.0}
camera {location <0,2,-5.5> look_at <0,0,0>}
light_source {<500,500,-500> rgb <0.8,0.9,1>}
light_source {<-10,3,0> rgb <1,1,0.8>}


#declare bd=2;

#declare S1=spline{
   quadratic_spline
  -1.00,<-2,0,0>
   0.00,< 0,2,0>
   1.00,< 2,0,0>
   2.00,< 0,-2,0>
}

object {
   Lathe(S1, 100, 360, 50, "")
   uv_mapping
   pigment{checker color rgb <0,0,0.2> color rgb <1,0.85,0.85> scale 0.05}
   finish{specular 0.4}
}


Post a reply to this message

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