Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Graphics3D without perspective

204 views
Skip to first unread message

ADL

unread,
Sep 27, 2010, 5:48:13 AM9/27/10
to
I would like to obtain a 3D plot, which can be rotated interactively,
but without any perspective effects (so that the front and back faces
of the picture generated by Graphics3D[] can superimpose perfectly).

This can be achieved easily in Martin Kraus' Live3D Java applet, and
even the degree of perspective can be changed interactively, but I
could not find an option to do this in the Mathematica frontend.

Any Idea?

ADL

David Park

unread,
Sep 28, 2010, 6:04:42 AM9/28/10
to
I believe that if you set the ViewPoint to be at a great distance, compared
to the size of the object, then there will be less and less apparent
perspective.


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/

Sjoerd C. de Vries

unread,
Sep 28, 2010, 6:05:58 AM9/28/10
to
You could use ViewPoint with large values to remove perspective
effects like this:

Graphics3D[{Yellow,Cuboid[{0,0,0}],Blue,Cuboid[{0.5,0.5,0.5}]},ViewPoint-
>{100,200,100}]

Cheers -- Sjoerd

M.Roellig

unread,
Sep 28, 2010, 6:05:25 AM9/28/10
to

Hi,

maybe use orthographic views (Help page of ViewPoint)

Table[Graphics3D[{Sphere[], Cylinder[{{0, 0, 0}, {5, 0, 0}}, .3]},
ViewPoint ->
v], {v, {{0, -Infinity, 0}, {Infinity, 0, 0}, {-Infinity, 0, 0}}}]

Markus

ADL

unread,
Sep 28, 2010, 6:05:36 AM9/28/10
to

Now, I found a solution myself:

Graphics3D[Cuboid[],
ViewPoint -> {0, -10000, 0},
ViewAngle -> 1.3 / 10000,
ViewVertical -> {0, 0, 1}
]

behaves as I wanted.
The ViewPoint must be very far and the ViewAngle a little bit bigger
than the angle of the object seen from that far.

I still could not find a way to interactively change the perspective
level.

By the way, I am surprised by the fact that Manipulate does not seem
to work on this:

Manipulate[
Graphics3D[Cuboid[],
ViewPoint -> {0, -10^p, 0},
ViewAngle -> 1.3/10^p,
ViewVertical -> {0, 0, 1}
],
{p, 0.3, 4, 0.1}
]

does not change the perspective while p is changed.
Who knows why?

ADL

John Fultz

unread,
Sep 29, 2010, 4:13:49 AM9/29/10
to

You're probably rotating the graphic in the Manipulate before it starts failing,
right? Rotating the graphic overwrites the values of the ViewPoint, ViewAngle,
and ViewVertical options, and it does so in a rather persistent way.

This is typically a desirable thing to do. If you're manipulating a 3D graphic,
you want to be able to rotate it, then manipulate it further without having the
rotation you did undone by a subsequent evaluation of the Manipulate's contents.

But it does have the unfortunate consequence that it becomes a task to create
Manipulates which actually *should* reset or change these options.

Sincerely,

John Fultz
jfu...@wolfram.com
User Interface Group
Wolfram Research, Inc.

0 new messages