Annoying bug found in v0.2.0

As you can see, the picture with the four elements has a bug, near the blue/red contact. I have stricly no idea so far why it has this problem. Here is the code used to generate these pictures :
	View view (Point3d(5,0,+10), Point3d(0,0,0),
		Vector3d(0,1,0.1), 4,3);

	Scene scene(Color(0,0,0), 1.0);

	Vector3d VX(1,0,0), VY(0,1,0), VZ(0,0,1);

	Object * o;
	o = new Ellipsoid (Point3d(0.75,0,0),
		Base3d(VZ,VX,VY),
		"bleu ciel",1.0,1,0.5,1.5);
	scene.addObject(o);

	o = new Ellipsoid (Point3d(-0.25,0,0.15),
		Base3d(VX-VZ-VY,VY-VZ,VX+VZ),
		"blanc",1.0,2,0.5,0.25);
	scene.addObject(o);

	o = new Sphere (Point3d(0,0.25,0.25),
		Base3d(VX,VY,VZ),
		"rouge",1.0,0.5);
	scene.addObject(o);

	o = new Sphere (Point3d(-1,0,0),
		Base3d(VX,VY,VZ),
		"jaune",1.0,1);
	scene.addObject(o);

	SolidColor * sc;
	sc = new SolidColor("bleu ciel",Color(0.5,0.5,0.75));
	scene.addMaterial(sc);

	sc = new SolidColor("jaune", Color(1,1,0));
	scene.addMaterial(sc);

	sc = new SolidColor("rouge", Color(1,0,0));
	scene.addMaterial(sc);

	sc = new SolidColor("blanc", Color(1,1,1));
	scene.addMaterial(sc);

	SimplestRayTracer raytracer;
	SimplestRenderer renderer;

    	Image image("output.bmp",80,60 );

	renderer.render(scene,view,raytracer,image);
Here is a version showing the bug, enlarged to 800x600, with the first ellipsoid built with Point3d(-0.5,0,0).

Bug has been corrected

This was a problem with the Polynom class : i forgot to check the 'delta' value of Polynom::solve2, finding always two roots instead of zero or one.
Here is a proof that everything works better now.

SourceForge.net Logo