eXorithm – Execute Algorithm: View / Run Algorithm lathe_shape

Logo Beta

function lathe_shape ($equation$start_x$end_x$detail$degree_x$degree_y$degree_z$face_color$vertex_color$scale$image_size
{
  $vdist = 20;
  $dist = 20;
  
  $sides = lathe_polygons$equation$start_x$end_x$detail);
  
  // project each of the polygons
  for ($i=0; $icount$sides); $i++) {
    $points[] = project_polygon$sides$i], $degree_x$degree_y$degree_z, ($end_x$start_x)/2, 0, 0, 20, 20, true);
  }
  
  // scale the image somewhat
  $scale = $image_size$scale/($end_x$start_x);
  
  return render_polygons$points$vertex_color$face_color, false, false, $image_size$scale);