I would like to create a 3D Plot in Mathematica 7 using an
orthographic projection instead of the default stereographic mode. So
far, I have found that it is possible to give something like
"ViewPoint->{0,0,Infinity}" as an option in order to view at the plot
from the top plane, using orthographic projection. But the ViewPoint
option seems to accept only +/-Infinity for *one* of the directions,
keeping all other zero. However, I would like to look at an
orthographic plot from any viewpoint, just as in the default 3d plots
(that I can rotate with the moue).
Does anybody know how that is possible?
Thanks,
Markus
In the example shown, replace
{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, 1}}
with
TransformationMatrix[ReflectionTransform[{0, 0, 1}]]
giving
Graphics3D[Sphere[], Boxed -> False,
ViewMatrix -> {TransformationMatrix[
RescalingTransform[{{-1, 1}, {-1, 1}, {-1, 1}}]],
TransformationMatrix[ReflectionTransform[{0, 0, 1}]]}]
The reason for having two matrices has to do with lighting.
For a somewhat more meaningful example try the following:
Manipulate[
Graphics3D[{PointSize[0.05], Sphere[{-1, -1, -1}, 0.05] ,
Arrowheads[{0.05}], Red, Arrow[Tube[{{0, 0, 0}, {1, 0, 0}}, 0.02]],
Text[Style["X", "Section"], {1, 0, 0}], Green,
Arrow[Tube[{{0, 0, 0}, {0, 1, 0}}, 0.02]],
Text[Style["Y", "Section"], {0, 1, 0}], Blue,
Arrow[Tube[{{0, 0, 0}, {0, 0, 1}}, 0.02]],
Text[Style["Z", "Section"], {0, 0, 1}]},
ViewCenter -> {{1/2, 1/2, 1/2}, ImageScaled[{1, 1}]},
ViewMatrix -> {TransformationMatrix[ScalingTransform[{1, 1, 1} s]],
TransformationMatrix[
ReflectionTransform[
Append[Normalize[pt - {1/2, 1/2}], -1 +
2 SquaredEuclideanDistance @@ (pt - {1/2,
1/2})]]]}], {{s, 0.27,
"Scale"}, 0.1, 0.5}, {pt, {{0.777, 0.292}}, Locator}]
Move the locator about to get different views.
Hope this helps...
Alexander
"markus" <markus...@googlemail.com> wrote in message
news:h2kjel$imk$1...@smc.vnet.net...