MathGroup Archive 1998

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

Search the Archive

Re: LightSources

Hi Maarten,

at first, if You need a rotated object (model coordinates) in fixed
world coordinates (where ViewPoint & LightSources are) You may use the
Graphics`Shapes package with its the RotateShape[] function.

Tom Wickham-Jones ("Mathematica Graphics ...") has a function
ViewPointFromUser[], ViewPointToUser[] in the packages of its book
(View3D.m package) that convert between the model and the world
coordinates. I expect that you can use the same functions to convert
the light positions. You may find the package on MathSource .

My book has a similar function for the calculation of line colors in
of the ViewPoint distance. You may find the informations about the book
at .

Finaly my MathGL3d program let You rotate/spin the 3d object with fixed
light sources (Menu or Spin, Rotate) You may find the program on my

with binaries for MS-Windows, Linux and Solaris. There You can find the
1.2 Version. The 2.0 Version is finished and will be available next
week for all systems.

Hope that helps

-----Original Message-----
From: Maarten.vanderBurgt at <Maarten.vanderBurgt at> To:
mathgroup at
Subject: [mg14474] [mg14440] LightSources

>In the MathGroup archives I found two messages with some questions
>regarding light sources. I attach them below. I did not find any
>answers or responses to them. Currently I have the same questions as in
>these two messages. I did read section 2.9.12 in the book and related
>help items. But this does
> not answer all these questions.
>Is there anyone who knows more about this or who can point me to the
>right sources?
>Maarten van der Burgt
>Icos Vision Systems
>******************************************************* From: Alex
To: mathgroup at
>Tabarrok <00attabarrok at> To: mathgroup at
>Subject: [mg14474] [mg14440] [mg7611] LightSources
>Organization: Ball State University
>         I have a 3D object which I want to show from different
>viewpoints.  As the viewpoint changes I want the colors to remain the
>same to facilitate comparisons.  Mathematica keeps it's RGB color
>sources in fixed positions in terms of the display, thus the colors
>change as one changes the viewpoint.  The solution would seem to be
>move the lightsources so that the lights are in the same position
>relative to the object as the viewpoint changes.  I am having trouble,
>however, figuring out how to convert display coordinates to viewpoint
>coordinates so that I can properly place the lights.  If anyone has
>already done this or has any other ideas I would appreciate hearing
>P.S. I have Mathematica 3.0
>Alex Tabarrok
>Department of Economics
>Ball State University
>******************************************************* From: Martin
To: mathgroup at
>Kraus <mkraus at> To:
>mathgroup at
>Subject: [mg14474] [mg14440] [mg10120] Coordinate system of LightSources
Organization: Univ.
>Erlangen-Nuernberg, Theoret. Physik III Hello,
>working on "" I am trying to find out how to simulate the
>lighting done by Mathematica. Does anyone know in which  coordinate
>system LightSources are defined? Or where this is explained? Ok, I know
>this is answered in the Mathematica book. Thus here are some questions
>which are connected with the question above but not answered by the
>Mathematica book:
>Why (and how) does the length of ViewPoint influence the lighting? (Does
>it just quench the space in the direction of ViewPoint?)  Why is the
>polygon in the following example not gray?
>Currently my answers (as programmed in "") are: The lighting
>should not depend on the length of ViewPoint. The polygon should
>begray. I am not suggesting to change these things (bugs?) in
>Mathematica  (its far too late). However I would like to be able to
>simulate them. Thanks for any response
>Martin Kraus

  • Prev by Date: Use of the command Display, with ImageResolution
  • Next by Date: Re: ImplicitPlot options (undocumented)
  • Previous by thread: LightSources
  • Next by thread: Re: LightSources