POV-Ray : Newsgroups : povray.general : Surface of a sphere : Re: Surface of a sphere Server Time
12 Aug 2024 11:15:14 EDT (-0400)
  Re: Surface of a sphere  
From: F VERBAAS
Date: 22 Feb 1999 13:59:30
Message: <36d1a912.0@news.povray.org>
Now, let me see. You can make a 'square' cone with a rounded base, simply
by:

#local a=tan(radians(9));

intersection{
   sphere{0,1}
   prism {
     conic_sweep
     linear_spline
     0, // height 1
     1, // height 2
     5, // the number of points making up the shape...
      <a,a>,<-a,a>,<-a,-a>,<a,-a>,<a,a>
    scale 2
  }
  rotate z*90
}

or something like that, but you will NOT be capable of building a sphere
from them, only a cross section, describing 9 degrees South to 9 degrees
North, if you rotate around the vertical axis.
To get pyramids to describe say 9 degrees North to 27 degrees north, you
need another base shape, representing some kind of trapezium, with one side
scaled by cos(radians(90-9-18)). This method leads to a
sphere with large patches at the equator, and fine patches at the poles.

A more promising method is the application of hexagons or triangles.

FRans





Andrew Cocker heeft geschreven in bericht <36d06de7.0@news.povray.org>...
>Hi all,
>
>I'm not sure how to describe what I want to be able to do, but I'll try.
>Lets say that I create, by CSG, a shape that can be described thus:
>Start with a sphere. On the surface, describe a square equivalent to 18
degrees of the
>entire sphere, then narrow it until at the centre it becomes zero. What I'm
trying to
>describe is a segment or wedge.
>What I want to know is..what is the math that would allow me to reconstruct
a sphere out
>of these pieces. I could type each rotation by hand, but I want to be able
to apply random
>scaling with regards to the radius of the sphere that each segment
originates from. By
>that I mean that one segment could have come from a sphere with radius 1,
while another
>could have come from a sphere with radius 1.4 etc...so the end result would
be a sphere
>made up of segments varying in height, but all being 18 degrees of the
entire surface.
>
>I apologise if my explanation is unclear. If you don't understand, then let
me know and
>I'll try again. This sounds to me like a candidate for a macro ( but I
don't at the moment
>know where to begin ). My main problem is that I can't work out how to make
sure every
>space is occupied by a segment. Although it would probably look good if not
every space
>*was* occupied.
>
>Thanks in advance if anyone can come up with any suggestions.
>
>Andy
>
>


Post a reply to this message

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