POV-Ray : Newsgroups : povray.general : 3d surface Server Time
5 Nov 2024 07:18:12 EST (-0500)
  3d surface (Message 1 to 3 of 3)  
From: marco
Subject: 3d surface
Date: 2 Jul 2007 14:30:01
Message: <web.468943e3b99aa2a33ffc67070@news.povray.org>
Dear all,

thanks in advance for your help.

I have a one dimensional curve
(http://www.fisica.unipa.it/~emoglobina/marco/I_vs_q.png)
that I would like to use as "profile" of an image recorded in a CCD instead
of the "color map" that I use in this moment in
"http://www.fisica.unipa.it/~emoglobina/marco/fig1.png"

Do you have any idea on how to do it ?

thanks,
marco


Post a reply to this message

From: Tim Attwood
Subject: Re: 3d surface
Date: 3 Jul 2007 04:57:52
Message: <468a0f90$1@news.povray.org>
If I understand what you want, you want
to control the falloff in intensity of a spot of
pigment based on a radial-like function?

You can #declare functions with splines
to match your curve, then create a pattern function,
and a pigment using that function as a pattern.

For example...

// raw data
#declare data = function {
   spline {
      natural_spline
     -0.2, 0.92,
      0.0, 0.92,
      0.1, 0.8,
      0.2, 0.38,
      0.25, 0.3,
      0.3, 0.23,
      0.4, 0.22,
      0.5, 0.20,
      0.6, 0.2,
      0.8, 0.15,
      0.9, 0.09
      1.0, 0.07,
      1.2, 0.09,
      1.4, 0.15,
      1.6, 0.15,
      1.8, 0.15
   }
};

// re-mapped data
#declare curve = function(A) {
   data(A*1.6).x
};

// radial pattern based on curve
#declare rpat = function(x,y,z) {
   abs(curve(atan(y/x)/360)*x*cos(atan(y/x))) +
   abs(curve(atan(y/x)/360)*y*sin(atan(y/x))) + 0*z
};

// radial pigment based on curve and color map
#declare rpig = pigment {
   function{ rpat(x,y,z)}
   color_map {
      [0 White]
      [1 Black]
   }
};


Post a reply to this message

From: marco
Subject: Re: 3d surface
Date: 4 Jul 2007 06:00:01
Message: <web.468b6f79269084dd3ffc67070@news.povray.org>
Dear Tim,

thanks for your reply. I manged to do something similar to what I had in
mind.
(I updated "http://www.fisica.unipa.it/~emoglobina/marco/fig1.png")
but to do it I used an isosurface built finding an analytic approximation of
my data that is quite boring and time consuming.

I was wondering if there was a better way.

thanks,
marco


Post a reply to this message

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