POV-Ray : Newsgroups : povray.binaries.images : IsoSurface help Server Time
2 Nov 2024 16:09:50 EDT (-0400)
  IsoSurface help (Message 1 to 1 of 1)  
From: Woody
Subject: IsoSurface help
Date: 2 Apr 2010 23:05:01
Message: <web.4bb6af70dba6e9c64fd370d20@news.povray.org>
Source is as follows:


#include "colors.inc"
#include "math.inc"

camera {
  location  <0.0, 1.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}


#declare num =  8;
#declare fn_theta_deg_of_x_y = function(x,y) { mod(atan2d(y,x) + 360,360) }
#declare fn_block = function(x,y) {
-1*mod(floor(fn_theta_deg_of_x_y(x,y)/(180/num)),2) }
#declare fn_x_y_z  = function(x,y) { fn_block(x,y) }
isosurface {
  function { fn_block(x, y) }
  contained_by { sphere { 0, 1.0 } }
  isosurface [0.0]
  accuracy 0.001
  max_gradient 2000

  pigment{color Red}
}


Post a reply to this message


Attachments:
Download 'escheriso20100402d.png' (45 KB)

Preview of image 'escheriso20100402d.png'
escheriso20100402d.png


 

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