POV-Ray : Newsgroups : povray.general : Artifacts when tracing somewhat high degree poly : Artifacts when tracing somewhat high degree poly Server Time
23 Apr 2024 04:34:58 EDT (-0400)
  Artifacts when tracing somewhat high degree poly  
From: Adrien
Date: 6 Dec 2022 04:05:00
Message: <web.638f05556eb8b15275a7ea2178e7deb4@news.povray.org>
Hi,

I'm trying to use Povray to plot a surface defined by a polynomial equation
spitted out by an auxiliary program. However, whenever the degree of that
polynomial is 10 or more I get a bunch of artifacts/black dots. Is there a way
to fix that ? Either directly in Povray, or in the auxiliary program ?

I guess I could try to write a program that produces a mesh from my equation,
but this feels somewhat unefficient, my understanding is that raytracing
something defined by polynomial equations is "easy" because it's easy to check
whether a given point is a solution (as opposed to actually solve the equation).

Any hint or suggestion would be greatly appreciated ! Below is an example and
attached it the result.


    #version version;
#include "colors.inc"
#include "rad_def.inc"
background { color White}
    #declare maxG=100000000;
#declare maxC=10;


camera
  {
  location <0, 0, -6.5>
//  location <0, 0, -0.1>
//  focal_point <0,0,0>
 // aperture 1.5
  right x*image_width/image_height up <0,1,0>
  look_at  <0.0, 0.0, 0.0>
  angle 20
 // blur_samples 5
  }


light_source
  {
  2*<5, 10, -40>
  color White
  area_light <5, 0, 0>, <0, 5, 0>, 5, 5
  adaptive 1
/*  fade_power 1
  fade_distance 30*/
  }


        #declare surf= texture{
     finish {
    ambient 0.0
   diffuse 0.3
    specular 0.2
    roughness 0.1
    reflection {0.0 metallic}
    }
}
poly{10,
 <1.0,0.0,0.0,0.0,5.0,0.0,0.0,5.0,-288.4708948753144,-1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,10.0,0.0,0.0,20.0,-11
53.8835795012576,-4.0,0.0,0.0,0.0,0.0,10.0,-1153.8835795012576,-16.0,0.0,-2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0
.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-1538.5114393350102,10.0,0.0,0.0,30.0,-1730.8253692518865,-6.0,0.0,0.0,0.0,0.0,3
0.0,-3461.650738503773,-48.0,0.0,-6.0,0.0,0.0,0.0,0.0,0.0,160.0,10.0,-1730.8253692518865,-42.0,384.62785983375255,-18.0
,576.9417897506288,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,15385.1143933501
03,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.0,0.0,0.0,20.0,-1153.8835795012576,-4.0,0.0,0.0,0.0,0.
0,30.0,-3461.650738503773,-48.0,0.0,-6.0,0.0,0.0,0.0,0.0,0.0,-320.0,20.0,-3461.650738503773,-84.0,769.2557196675051,-36
.0,1153.8835795012576,4.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.0,-1153.8835795012576,-40.0,769.2557196675051,-30.0,1923.13
92991687628,16.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-7692.55719667
5051,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.
0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,5.0,-288.4708948753144,-1.0,0.0,0.0,0.0,0.0,10.0,-1153.8835795012576,-16.0,0.0,-2.0,0
.0,0.0,0.0,0.0,0.0,32.0,10.0,-1730.8253692518865,-42.0,384.62785983375255,-18.0,576.9417897506288,2.0,0.0,0.0,0.0,0.0,0
.0,0.0,0.0,0.0,5.0,-1153.8835795012576,-40.0,769.2557196675051,-30.0,1923.1392991687628,16.0,0.0,1.0,0.0,0.0,0.0,0.0,0.
0,0.0,0.0,0.0,0.0,0.0,1.0,-288.4708948753144,-13.0,384.62785983375255,-14.0,1346.197509418134,14.0,384.62785983375255,1
3.0,-288.4708948753144,-1.0>
sturm on
 texture {surf}
 pigment {color Blue}
scale -0.4

rotate <0,45,0>
translate <0,0,-0.5>
scale -0.9}


Post a reply to this message


Attachments:
Download 'mwe.png' (188 KB)

Preview of image 'mwe.png'
mwe.png


 

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