Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: LightSources

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14474] Re: [mg14440] LightSources
  • From: "Jens-Peer Kuska" <kuska at linmpi.mpg.de>
  • Date: Fri, 23 Oct 1998 20:58:52 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

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
depenence
of the ViewPoint distance. You may find the informations about the book
at http://www.mpae.gwdg.de/~kuska .

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
www-page

http://www.mpae.gwdg.de/~kuska/mview3d.html

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
  Jens

-----Original Message-----
From: Maarten.vanderBurgt at icos.be <Maarten.vanderBurgt at icos.be> To:
mathgroup at smc.vnet.net
Subject: [mg14474] [mg14440] LightSources


>
>Hello,
>
>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?
>
>thanks
>
>Maarten van der Burgt
>
>Icos Vision Systems
>Leuven
>Belgium
>
>
>******************************************************* From: Alex
To: mathgroup at smc.vnet.net
>Tabarrok <00attabarrok at bsu.edu.bsu.edu> To: mathgroup at smc.vnet.net
>Subject: [mg14474] [mg14440] [mg7611] LightSources
>Organization: Ball State University
>Hello,
>
>         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
>them.
>
>Thanks
>
>Alex
>
>P.S. I have Mathematica 3.0
>Alex Tabarrok
>Department of Economics
>Ball State University
>
>******************************************************* From: Martin
To: mathgroup at smc.vnet.net
>Kraus <mkraus at theorie3.physik.uni-erlangen.de> To:
>mathgroup at smc.vnet.net
>Subject: [mg14474] [mg14440] [mg10120] Coordinate system of LightSources
Organization: Univ.
>Erlangen-Nuernberg, Theoret. Physik III Hello,
>working on "Live.java" 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?
>Show[Graphics3D[Polygon[{{0,0,0},{1,0,0},{1,0,1},{0,0,1}}],
>ViewPoint->{1,0,0},PlotRange->{{0,1},{0,1},{0,1}},
>LightSources->{{{1,0,1},RGBColor[1,0,0]},{{1,0,-1},RGBColor[0,1,1]}}]];
>Currently my answers (as programmed in "Live.java") 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