POV-Ray : Newsgroups : povray.general : Help with plotting a parametric equation : Re: Help with plotting a parametric equation Server Time
31 Jul 2024 08:33:06 EDT (-0400)
  Re: Help with plotting a parametric equation  
From: SharkD
Date: 17 Jan 2008 23:55:01
Message: <web.479030a33284050c7ba03b340@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> I'd say that a bicone is a poor representation of HSL anyways...
> it doesn't have a 1:1 mapping of points, points in the bicone
> can't be inverted to refer to a particular HSL vector. Though
> for artistic reasons it makes some sense to leave out repeated
> colors... who needs multiple white vectors?

The point of the debate is that they want to remove a spherical model (a simple
mapping of the HSL vectors to spherical coordinates) from the article. The
image was eventually removed for being "original research" (which it is), but
they're continuing to debate its merits as well as the merits of their own. The
debate is getting kind of tiresome, and I'm thinking of backing out and cutting
my losses.

> Try this code, it uses vector macros instead of parametric
> functions... (that should avoid the crashes too)

Thanks for the cone, but I'm trying to render the particular model (some weird
construction designed to meet the specifications of one of the references)
described in the image I linked to. Here's the fixed version of the code (there
was a problem with the loops):

#local cone_max_h = 12;
#local cone_max_s = 6;
#local cone_max_l = 6;
#local cone_interval_h = 360/cone_max_h;
#local cone_interval_s =   1/cone_max_s;
#local cone_interval_l =   1/cone_max_l;
#local cone_max_i = 1000;

#local cone_count_h = 0;
#while (cone_count_h < cone_max_h)
 #local cone_h = cone_count_h * cone_interval_h;
 #local cone_count_s = 0;
 #while (cone_count_s < cone_max_s)
  #local cone_s = cone_count_s * cone_interval_s;
  #local cone_count_l = 0;
  #while (cone_count_l < cone_max_l)
   #local cone_l = cone_count_l * cone_interval_l;
   #local new_var = 2 * cone_l - 1;
   #local f_of_new_var = sqrt(1 - pow(new_var, 2));
   #local x_coo = f_of_new_var * cone_s * cosd(cone_h);
   #local y_coo = f_of_new_var * cone_s * sind(cone_h);
   #local z_coo = new_var;
   sphere
   {
    < x_coo, z_coo, y_coo>, 0.05
    texture
    {
     pigment {rgb CHSL2RGB(<cone_h, cone_s, cone_l>)}
    }
   }
   #local cone_count_l = cone_count_l + 1;
  #end
  #local cone_count_s = cone_count_s + 1;
 #end
 #local cone_count_h = cone_count_h + 1;
#end


Post a reply to this message

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