go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ REQ 5235]: lights in geomview and Mathematica



This is not a 'heavy' question--in fact it is a 'light' question.


Does one of you have a copy of a lighting setup that will (closely)  
duplicate the default lighting used by Plot3D of Mathematica ?


the Mathematica default is:


 LightSources -> 

 

   {{{1., 0., 1.}, RGBColor[1, 0, 0]}, 

 

    {{1., 1., 1.}, RGBColor[0, 1, 0]}, 

 

    {{0., 1., 1.}, RGBColor[0, 0, 1]}}

So I tried to arrange lights to be like this in geomview:

(progn
 (merge-baseap appearance {
	 face
	 -edge
	 vect
	 -transparent
	 evert
	  shading flat
	 -normal
	   normscale 1
	   linewidth 1 

  material {
	shininess 15.000000
	ka 0.300000
	kd 1.000000
	ks 0.300000
	alpha 1.000000
	ambient 1.000000 1.000000 1.000000
	diffuse 1.000000 1.000000 1.000000
	specular 1.000000 1.000000 1.000000
	edgecolor 0.000000 0.000000 0.000000
	normalcolor 1.000000 1.000000 1.000000
  }
  lighting {
	ambient 1 1 1
	localviewer 1
	attenconst 0
	attenmult 0
	replacelights
	light {
		ambient 0.000000 0.000000 0.000000
		color 1.000000 0.000000 0.000000
		position 1.000000 0.000000 1.000000 0.000000
	}
	light {
		ambient 0.000000 0.000000 0.000000
		color 0.000000 1.000000 0.000000
		position 1.000000 1.000000 1.000000 0.000000
	}
	light {
		ambient 0.000000 0.000000 0.000000
		color 0.000000 0.000000 1.000000
		position 0.000000 1.000000 1.000000 0.000000
	}
  }
}
 ) # end base appearance
(new-geometry "[g1]"	# x2timesHalfy2a.off
{ = LIST
{ = INST
transform {
             1             0             0             0
             0             1             0             0
******** and lots of other geom stuff here of course ******



This is sort of the right thing--but doesn't look like Mma. (In fact,  
it looks better, but that's not the point).  In the Mma book they say  
that they use NO ambient light, whereas I am using it in the  
above--but changing this still doesn't give a good match.

(I have not spent a lot of time on this--perhaps it has something to  
do the the Mma SurfaceColor )

But I maybe I should be asking--is the geomview lighting model the  
same as in Mma.
 

This is NOT an important thing to spend time on if you don't have a  
ready answer.  I am thinking about having a student do a project  
dealing with (some) of these topics.


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo