Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Trouble with Perspective

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124955] Trouble with Perspective
  • From: Mark Green <p0073857 at brookes.ac.uk>
  • Date: Tue, 14 Feb 2012 06:37:58 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

I'm trying this method based on the example from the Documentation
Centre to create a perspective projection:

teapot := Translate[ExampleData[{"Geometry3D", "UtahTeapot"},
"GraphicsComplex"], {-0.5, 0, -0.6}];
t := TransformationMatrix[RescalingTransform[{{-10, 10}, {-10, 10},
{-3/2, 5/2}}]];
Manipulate[
 Graphics3D[Rotate[teapot, xs, {1, 0, 0}], Axes -> True,
  ViewMatrix -> {t, {{1, 0, 0, -dx}, {0, 1, 0, -dy}, {0, 0, 1, 0},
{0,  0, -1/d, 0}}}, Lighting -> {{"Ambient", White}}],
 {xs, 0, Pi}, {d, 0.1, -10}, {dx, -10, 10}, {dy, -10, 10}]

The problem is that the vanishing point of the perspective projection
is always way down in the corner of the image, and there doesn't seem
to be any way I can alter dx/dy or the RescalingTransform to get it
into the centre (which is where I want it).  Is there a way to do
this?

Also, is there a way to have the axes in a 3D image displayed as lines
crossing at the origin point rather than along the edges of the image?





  • Prev by Date: Re: Setting global graphics options
  • Next by Date: Running MathematicaScript in Mac Terminal
  • Previous by thread: Workbench Profile[] question
  • Next by thread: Running MathematicaScript in Mac Terminal