Problem with 3D figures

Andre_Boileau shared this question 2 years ago
Answered

Go to page http://profmath.uqam.ca/~bo...

and fix the slider at n=3 : some spheres are not drawn.

Go to page http://profmath.uqam.ca/~bo...

and fix the slider at n=3 : all spheres are drawn.

The difference : first case is rendered with current version of GeoGebra, and second case is rendered with an old version.

Comments (11)

photo
1

What commands are sent to GeoGebra when the slider is moved?

photo
1

The following commands : reset, setCoordSystem, Sphere, SetColor and SetFilling.

photo
1

Please can you post the exact syntax that's sent?

photo
1

Here are the exact commands

document.getElementById('test3D').contentWindow.ggbApplet.reset()

document.getElementById('test3D').contentWindow.ggbApplet.setAxesVisible(3,false,false,false)

document.getElementById('test3D').contentWindow.ggbApplet.setVisible("xOyPlane",false)

document.getElementById('test3D').contentWindow.ggbApplet.setCoordSystem(-2,2,-2,2,-2,2,false)

document.getElementById(test3D).contentWindow.ggbApplet.evalCommand(s1=Sphere((-1,-1,-1),0.5))

document.getElementById(test3D).contentWindow.ggbApplet.evalCommand(SetColor(s1,0.5254,0.6980,0.6313))

document.getElementById(test3D).contentWindow.ggbApplet.evalCommand(SetFilling(s1,0.7058823529411765))

...

photo
1

Sorry, I forgot the single quotes in the last 3 commands

photo
1

document.getElementById('test3D').contentWindow.ggbApplet.evalCommand('s1=Sphere((-1,-1,-1),0.5)')

document.getElementById('test3D').contentWindow.ggbApplet.evalCommand('SetColor(s1,0.5254,0.6980,0.6313)')

document.getElementById('test3D').contentWindow.ggbApplet.evalCommand('SetFilling(s1,0.7058823529411765)')

photo
photo
1

Hm,


perhaps a rounding problem.

I had a similar effect with cindyscript (loops do not go to the end)

https://www.stacklounge.de/...

photo
1

This draws only one sphere, what's the full set of commands sent?

ggbApplet.reset()
ggbApplet.setAxesVisible(3,false,false,false)
ggbApplet.setVisible("xOyPlane",false)
ggbApplet.setCoordSystem(-2,2,-2,2,-2,2,false)
ggbApplet.evalCommand('s1=Sphere((-1,-1,-1),0.5)')
ggbApplet.evalCommand('SetColor(s1,0.5254,0.6980,0.6313)')
ggbApplet.evalCommand('SetFilling(s1,0.7058823529411765)')

photo
1

Never mind, I can see the problem now :)https://test.geogebra.org/~...

photo
1

Thanks for the great report - that's fixed now and will be released in a couple of weeks :)

photo
1

Thanks for the quick fix. I am waiting impatiently for it!

© 2023 International GeoGebra Institute