POV-Ray : Newsgroups : povray.general : implicit and parametric surfaces ? Server Time
2 Nov 2024 00:21:42 EDT (-0400)
  implicit and parametric surfaces ? (Message 1 to 6 of 6)  
From:
Subject: implicit and parametric surfaces ?
Date: 14 Apr 2000 19:08:02
Message: <38f7a4d2@news.povray.org>
Hi !

how can I render implicit and parametric surfaces with povray without
using any external programs ?

I have tried to make lots of smooth_triangles with some macros, but you
can clearly see the edges of these triangles (ugly).

Any hints ?

Achim


Post a reply to this message

From: John VanSickle
Subject: Re: implicit and parametric surfaces ?
Date: 14 Apr 2000 19:32:03
Message: <38F7AD64.EA2CC6FF@erols.com>

> 
> Hi !
> 
> how can I render implicit and parametric surfaces with povray without
> using any external programs ?

I use pencil and paper.

> I have tried to make lots of smooth_triangles with some macros, but
> you can clearly see the edges of these triangles (ugly).
> 
> Any hints ?

Use smaller triangles.
-- 
ICQ: 46085459


Post a reply to this message

From: Chris Huff
Subject: Re: implicit and parametric surfaces ?
Date: 14 Apr 2000 19:53:32
Message: <chrishuff_99-ABE5E1.18561514042000@news.povray.org>

<ast### [at] t-onlinede> wrote:

> how can I render implicit and parametric surfaces with povray without
> using any external programs ?

Depends on what you mean by "external programs". You can use an 
unofficial version of POV-Ray which has been modified to support 
isosurfaces and parametric objects, like MegaPOV:
http://nathan.kopp.com/patched.htm


> I have tried to make lots of smooth_triangles with some macros, but you
> can clearly see the edges of these triangles (ugly).

Well, make sure your normal calculating code is right, otherwise you can 
just use smaller triangles and more of them. This can use up your memory 
quite fast, though...

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From:
Subject: Re: implicit and parametric surfaces ?
Date: 14 Apr 2000 19:54:32
Message: <38f7afb8@news.povray.org>
"John VanSickle" <van### [at] erolscom> schrieb im Newsbeitrag
news:38F7AD64.EA2CC6FF@erols.com...

> >
> > Hi !
> >
> > how can I render implicit and parametric surfaces with povray
without
> > using any external programs ?
>
> I use pencil and paper.
and how many triangles can you draw per hour ? (SCNR)

> > I have tried to make lots of smooth_triangles with some macros, but
> > you can clearly see the edges of these triangles (ugly).
> >
> > Any hints ?
>
> Use smaller triangles.

I don't think that this is the problem. It must be something else. Apart
from that, I don't
want to calculate the derivatives used to form the normals by hand.

Below is my attempt to create the sombrero as a mesh of
smooth_triangles. Perhaps someone can find the problem.

Achim


<snip--->
global_settings { assumed_gamma 1.0 }

camera
{ 
  location  <2, 2, -2>
  look_at   <0, 0, 0>
} 


background { color rgb <0, 0, 0> }

light_source { <20, 20, -10> colour 1 }

// ------------------------------------------------------------------
// Set up the loop variables:
// the xc & zc variables will go from -1.0 to +1.0
// in NumIterations loops.
#declare NumIterations = 10; // try 6 to 16
#declare Increment     = 1.0/(NumIterations*2);
#declare yStretch      = 0.25;
//#declare pi          = 3.141592653589793238462643383279502884197169399375105820975;
   
//helper functions  
#macro function(px, pz)
 (sin(sqrt(px*px+pz*pz)*4*pi))
#end

#macro dfdx(px, pz)
 (px*cos(sqrt(px*px+pz*pz)*4*pi)/(2*sqrt(px*px+pz*pz)))
#end

#macro dfdz(px, pz)
 (pz*cos(sqrt(px*px+pz*pz)*4*pi)/(2*sqrt(px*px+pz*pz)))
#end


#macro tangentx(px, pz)
 (<1.0, dfdx(px, pz), 0.0>)
#end

#macro tangentz(px, pz)
 (<0.0, dfdz(px, pz), 1.0>)
#end

#macro normalxz(px, pz)
 (vcross(tangentx(px, pz), tangentz(px, pz)))
#end
 
#macro MakeQuad(px, pz)
// #debug concat("quad (", str(px, 0, 3), "/", str(py, 0, 3), "/", str(pz, 0, 3), ") ,
(", str(px + Increment, 0, 3), "/", str(py
, 0, 3), "/", str(pz + Increment, 0, 3), ")\n")
 smooth_triangle
 {
  <px,     yStretch*function(px, pz),       pz>,
  normalxz(px, pz)

  <px + Increment, yStretch*function(px + Increment, pz),    pz>,
  normalxz(px + Increment, pz)

  <px,     yStretch*function(px, pz + Increment),    pz + Increment>
  normalxz(px, pz + Increment)
 }
 smooth_triangle
 {
  <px,     yStretch*function(px, pz + Increment),    pz + Increment>,
  normalxz(px, pz + Increment)

  <px + Increment, yStretch*function(px + Increment, pz),    pz>,
  normalxz(px + Increment, pz)

  <px + Increment, yStretch*function(px + Increment, pz + Increment), pz
+ Increment>
  normalxz(px + Increment, pz + Increment)
 }
#end

mesh
{ 
 #declare zc = -1.0;
 
 #while (zc < 1.0)
  #declare xc = -1.0; 
  
  #while (xc < 1.0)

   MakeQuad(xc, zc)
   
   #declare xc = xc + Increment;
  #end
  
  #declare zc = zc + Increment;
 #end
 
 texture
 {
  pigment
  {
   color rgb <1, 0, 0>
  }
  finish
  {
   ambient 0.2 specular 0.7 roughness 0.05 reflection 0.3
  }
 }
}
<snip--->


Post a reply to this message

From: D  Masnéri
Subject: Re: implicit and parametric surfaces ?
Date: 15 Apr 2000 10:33:04
Message: <38F87DF2.95BAB3E4@planete.net>
A patch PovRay version enabling isosurface will do fine.

D.M.


Post a reply to this message

From: John VanSickle
Subject: Re: implicit and parametric surfaces ?
Date: 15 Apr 2000 19:34:01
Message: <38F8FF5D.7B40C2D2@erols.com>

> 
> "John VanSickle" <van### [at] erolscom> schrieb im Newsbeitrag
> news:38F7AD64.EA2CC6FF@erols.com...

> > >
> > > Hi !
> > >
> > > how can I render implicit and parametric surfaces with povray
> without
> > > using any external programs ?
> >
> > I use pencil and paper.
> and how many triangles can you draw per hour ? (SCNR)

I don't.  I use the pencil and paper to write the POV script that
generates the triangles.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

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