POV-Ray : Newsgroups : povray.newusers : Isosurface positioning Server Time
31 Oct 2024 22:19:11 EDT (-0400)
  Isosurface positioning (Message 1 to 2 of 2)  
From: EnSlavingBlair
Subject: Isosurface positioning
Date: 14 Sep 2012 22:10:00
Message: <web.5053e24ba02f87a3ee2b2d480@news.povray.org>
Hi,

I have made an isosurface to look the way I want it to, but I cannot work out
how to put it where I want it to be! Currently its just sitting in the main view
of my screen, but I want it in the background. How do I do that? Also, is there
a way to make the whole thing an object?

I've attached the relevant part of my code for reference.

Thank you so much!

#declare fn_A = function {sqrt(2*pow(x,2)+2*pow(z,2))+2*y}          // Cone
#declare fn_main_rock = function { max(f_sphere(x,y,4*z,1.6), fn_A(x,y,z),
fn_A(0.25*x,0.15*y,z), fn_A(-0.15*x,0.25*y,z))}
#declare fn_rock = function {fn_main_rock(x,y,z)-f_noise3d(x*5,y*8,z*5)*0.5}

isosurface {
 function {
  fn_rock(x,y,z)
 }
 accuracy 0.1
 max_gradient 4
 contained_by { sphere {<0,0,0>, 3} }
 texture { T_Stone23 scale 4}
}


Post a reply to this message

From: Thomas de Groot
Subject: Re: Isosurface positioning
Date: 15 Sep 2012 03:48:55
Message: <505432e7$1@news.povray.org>
On 15-9-2012 4:04, EnSlavingBlair wrote:
> Hi,
>
> I have made an isosurface to look the way I want it to, but I cannot work out
> how to put it where I want it to be! Currently its just sitting in the main view
> of my screen, but I want it in the background. How do I do that? Also, is there
> a way to make the whole thing an object?
>


You can use the transformations also used for primitives: scale, rotate, 
translate (see relevant paragraphs in the Docs) either within the 
isosurface block, or in an object derived from the isosurface:

isosurface {
   ...
   ...
   scale YourScale
   rotate YourRotation
   translate YourTranslation
}

or:

#declare MyIsosurface =
isosurface {
   ...
   ...
}

object {
   MyIsosurface
   scale YourScale
   rotate YourRotation
   translate YourTranslation
}


Thomas


Post a reply to this message

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