
Bumpmap V2.0 - by Tobias Hill - Copyright  1998-01-25

Description:

	This applet simulates a lightsource moving above a
	bumpy surface. The applet gives the impression of 
	highlights on the "facets" that face in the direction 
	of the lightsource and shadows on the others. The bumpy 
	surface is described by using a grayscale image. You can 
	play around alot with the parameters to get the right 
	surfacefeeling. 


Parameters:

   <APPLET code="Bump2_0.class" width=300 height=100>
   <param name=bumpmap_filename     value="bump1.gif">
   <param name=material_shininess   value="2">
   <param name=material_bumpheight  value="40">
   <param name=lamp_radius          value="50">
   <param name=lamp_r               value="0.5">
   <param name=lamp_g               value="0.6">
   <param name=lamp_b               value="1.0">
   <param name=lamp_amplifier       value="1.8">
   <param name=lamp_moveable        value="true">
   <param name=x_period             value="2">
   <param name=y_period             value="3">
   <param name=x_amplitude          value="300">
   <param name=y_amplitude          value="100">
   <param name=x_add                value="0">
   <param name=y_add                value="0">
   The bumpmap applet. You need a browser that enables java.
   </APPLET>


Parameter descriptions:

	The parameternames speak alot for themselves but I give
	them a short descrition anyway... 
	An important thing though: When changing parameters it 
	won't always give the result that is expected from a 
	physical material-light-interaction point of view. That's
	because of the fact that this is a very tweaked routine.
	Calculating-speed has been the main concern. 
	
	bumpmap_filename:
		The namn of the file that you want to descibe the
		surface with. This file should preferably be a 
		grayscale gif image. The internal representation
		of the bumpy surface is derived from the colors
		in the image. White pixels describe the highest
		point on the surface and a	black pixel the lowest.

	material_shininess: (min: 1, max: 10, default: 3)
		This describes how sharp the highlight will on the
		surface. Sort of a 'gloss'. The radius of the lamp
		will seem smaller if you increase the material_shininess
		constant. Herefore you might want to compensate
		with the lamp_radius constant.

	material_bumpheight: (min: 0, max: 100, default: 40)
		The height of the bumps. zero gives an absolutey flat 
		surface (sort of boring).

	lamp_radius: (min: 10, max: 80, default: 40)
		The radius of the lamp.
	
	lamp_r: (min: 0.0, max: 1.0, default: 1.0)
		The color of the lamp. The Red-component.

	lamp_g: (min: 0.0, max: 1.0, default: 0.98)
		The color of the lamp. The Green-component.

	lamp_b: (min: 0.0, max: 1.0, default: 0.90)
		The color of the lamp. The Blue-component.

	lamp_amplifier: (min: 0.0, max: 4.0, default: 1.1)
		Use this constant if you like to boost the
		lamp (if you want it to shine more than 100% 
		for instance)
   	
	lamp_moveable: (true/false, default: true)
		Defines whether the lamp is moveable with the mouse.
	
	x_period: (default: 4)
		The x_period alter the way the lamp moves in x.
		Specify how many periods of the cosine it will
		run through when the angle goes from 0 to 2*pi.

	y_period: (default: 6)
		The y_period alter the way the lamp moves in y.
		Specify how many periods of the sine it will
		run through when the angle goes from 0 to 2*pi.

	x_amplitude: (default: width)
		The x_amplitude defines the amplitude of the
		x-lamp-movements. Origo is in the middle of the	map.

	y_amplitude: (default: height)
		The y_amplitude defines the amplitude of the
		y-lamp-movements. Origo is in the middle of the	map.

	x_add: (default: 0)
		The x_add defines an x-lamp-offset. 
		Origo is in the middle of the map.

	y_add: (default: 0)
		The y_add defines an y-lamp-offset. 
		Origo is in the middle of the map.

IMPORTANT:
	You must have the LinkWindow.class in the same directory as
	where the Bump2_0.class is located. Otherwise the applet 
	won't start.



Copyright and distribution notices:

	You may use this applet freely on your homepage as long 
	as the following is true:
	*  Your homepage isn't commercial.
	*  You agree to the license agreement in the file
		license.txt that this file is accompanied by. 
	*  The applet isn't altered in any other way than
		what is possible to do by setting the parameters 
		from the html document. That means for instance: 
		The applet 'should'/'have to' launch the linkwindow 
		when beeing clicked, and the initial-text (when the
		applet starts up) should remain intact.
	
	Eventhough you are allowed to use a copy of this applet
	I, Tobias Hill, own the full rights to the sourcecode. 
	I can also, without further discussion, take away your 
	rights to use this applet on your page, if I for any 
	reason (whatsoever) find it used in an inapropriate 
	context. 

	If you want to use this applet in a commercial context, 
	please contact me. 

	In case of bugs please send me a mail about it.

	I am also interested in hearing where and how you use it,
	so when you are done please send me an e-mail.
	
-------------------------------------------------------------

Tobias Hill,  1998-01-20							
tobias.hill@citerus.se
http://www.citerus.se/Tobias

Citerus 
info@citerus.se
http://www.citerus.se
More applets on ->  http://www.citerus.se/embryo


