POV-Ray : Newsgroups : povray.general : Parametric surfaces faster than thought. : Re: Parametric surfaces faster than thought. Server Time
20 Apr 2024 04:36:19 EDT (-0400)
  Re: Parametric surfaces faster than thought.  
From: Le Forgeron
Date: 14 Jun 2020 12:36:48
Message: <5ee65220$1@news.povray.org>
Le 11/05/2020 à 19:16, Le_Forgeron a écrit :

> Hold my drink.
> 
> Looks like making parametric an UVMeshable object.
> 
> 
> http://wiki.povray.org/content/User:Le_Forgeron/UVMeshable
> 
> Does not seem impossible, using the bound of the parametric as the range
> for uv.
> 

Yep, done now in new release of Hgpovray38 :
https://github.com/LeForgeron/povray/releases/tag/v3.8.0.alpha%2BHg.228.Jasmin

> https://github.com/LeForgeron/povray/releases/tag/v3.8.0.alpha%2BHg.228.Jasmin

Beware, contained_by is *not* honored.

#declare OBJ= parametric{
  function{ u/2 }     //x(u,v)  or x
  function{ 0.05*(sin(v*pi)+sin(u*pi))}
  function{ v/2 }     //z(u,v)  or z
  <-4,-2>,<4,2>  // start, end of (u,v)
  contained_by {box {<-2,-1,-1>,<2,1,1>}}
  max_gradient 2
  accuracy 0.0035
  precompute 18 x,y,z
  scale  0.25
  texture { T }
}

#include "NurbsMesh.inc"

#declare Foo=
mesh{
  UVMeshable(OBJ, 16*4, 16*4 )

 texture { T }
  rotate -90*x
 translate 0.5*x+0.5*z
};
object{ Foo }


Post a reply to this message

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