Different scales along different axes?

31 views
Skip to first unread message

kakadu kakaduson

unread,
Jul 22, 2015, 1:03:59 AM7/22/15
to VPython-users
It seems scales (scale or range) are same on the all 3 axes.

Is it possible to make it different?

Stetson

unread,
Jul 22, 2015, 1:13:07 AM7/22/15
to VPython-users
In other words, what if I don't want to keep aspect ratio?

Bruce Sherwood

unread,
Jul 22, 2015, 12:27:43 PM7/22/15
to vpytho...@googlegroups.com
There is an essentially undocumented feature used as far as I know only by the graphing package (site-packages/visual_common/graphpy):

scene.uniform = False
scene.range = (11,1.1,0.1)
curve(pos=[ [-10,-1,0], [10,-1,0], [0,1,0] ])

You will see that the window is 20 wide and 2 tall, thanks to "scene.uniform = False". There are only a few objects that can be displayed with nonuniform axes: label, curve, faces, points, and distant_light. All other objects give an error. The issue is that 3D objects don't make much sense with nonuniform axes, especially when rotated so that they don't lie along the xyz axes.

How would you use non-uniform axes?

Stetson

unread,
Jul 22, 2015, 11:18:40 PM7/22/15
to VPython-users, bruce.s...@gmail.com
Wow that's great. Esp possibility for curves to have different scales.

I am making surface plot for 2-variable functions using curves. There is a bounding box with non-equal sides, so far I have been using math to fit the plot inside the box. With this feature it seems I can plot surface graphs with non-equal scales without some extra steps. :)
Message has been deleted

Stetson

unread,
Jul 22, 2015, 11:26:48 PM7/22/15
to VPython-users, kakaduk...@gmail.com

Using curves:Using faces:

Bruce Sherwood

unread,
Jul 23, 2015, 12:13:53 AM7/23/15
to vpytho...@googlegroups.com
Very beautiful!

Reply all
Reply to author
Forward
0 new messages