|
From: symion <sy...@pr...> - 2008-12-26 04:23:10
|
I have been testing Vpython, looking for boundaries.
IDLE just through up an error.
I was zooming in to a simple scene, looking for limits
Zooming in to destruction.
Here is the code snippet that was running, although I have run other
bits of code and found the same result.
r=1.49e+15
cur=[(0,0,0),(r,0,0)]
p=points(pos=cur,color=(1,1,1))
Now zoom in and in, and in like a crazy man, looking for that boundary.
oops!
VPython ***CRITICAL ERROR***: ..\src\core\display_kernel.cpp:909:
cvisual::display_kernel::render_scene: OpenGL error:
..\src\core\display_kernel.cpp:548 invalid value, aborting.
Also, when zooming out and out...
VPython ***CRITICAL ERROR***: ..\src\core\display_kernel.cpp:535:
cvisual::display_kernel::world_to_view_transform: VPython degenerate
projection: 1.#INF 1.#INF 0.0500417 0.0315297
Yep, found the other one!
Are the problems reported related to the apparent lack of any clear
range/scale boundaries?
Which leads me into the next question.
I am having problems with scene.range. I expect it to be connected to
user zoom, so I can measure user input, just like scene.forward method.
This is what I have found.
If I run any program without setting scene.range then a default value
seems to be used and the program runs OK, but if I then try to read the
current scene.range, IDLE displays the following warning.
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
scene.range
RuntimeError: Reading .scale and .range is not supported when autoscale
is enabled.
Now if I change the program so that scene.range is set to some arbitrary
value and then run it, then the program runs OK, no problems, and
reading scene.range returns the exact value I gave it! (which is kind of
redundant)
But when as a user I zoom in or out, and then read scene.range, nothing
happens! the value is as I had previously set, no user actions are
recorded by scene.range!
if scene.userzoom and scene.range are not connected, then how can I (or
my program) determine the current user zoom value?
Symion
|