Example 15

 

This is the continuation of Example 14.

The first thing to be done before placing the bulbs or lights in a lamp is to calculate their position. All measurements are based on a scale of 1/16 so all sizes are multiplied by 16. From the table above we can calculate the positions of the lamps as follows:

Notice here the rotation of the lamp to the front.

The bulb should be placed in the center of the lamp.

Now to add the bulbs to the lamp:

  • From the Action menu select the Place bulbs option.
  • On the graph click the number of bulbs you want to add to the lamp, in our case two. Bulbs are represented by yellow circles.
    As previously calculated they will be placed at the following coordinates:
    • Left bulb:  (-5, -5)
    • Right bulb: (5, -5)
  • Select the Bulb altitude position spinner and set the altitude at 215 meters.
  • Select the Bulb light color and its intensity.
You can now compile your macro and go to the scenery for testing.

This shows a close up of the lamp with the 2 bulbs in place.

Even if the lamp has two bulbs we can only draw one beam. If we start from the center between the two lamp and we will get excellent results.

If you draw more than one beam you'll get crossing polygons from one light into the other. You must avoid this.

 

Now to add the beam to the lamp:

The beam is nothing more than a cone. The top point is the light source and you draw a base with points around the top point position.

  • From the Action menu select Draw beam polygon.
  • Select the Beam color and its transparency value.
  • Select the Ground light color and its transparency value. This is optional. You can choose if a lamp draws a polygon on the ground or not.
  • Enter the Beam altitude position and the Beam vertical range values.
This graphic gives a better understanding of the beam altitude and vertical range values. The lamp is placed on top of a building and its beam is projected over the roof of building 2. From this table we can calculate:

Beam altitude position: 3 + 4 + 6 = 13
Beam vertical range:    4 + 6 = 10

In our example, since the beam is projected over the ground, both values are the same.
A good value is one meter less than the beam altitude position, or 214 meters.

  • Add the first point of the beam in the graph.
    This first point, represented in green, indicates the top position of the beam or cone - the light source.
  • Draw the ground polygon that will form the base of the cone.

 

This shows the base of the lamp. Notice all the points in red around the green light source point.

 

 

The lamp in the scenery.

The intensity of the beam and ground polygon is very important and you will need to make some tests before you get the level of transparency you are looking for.

To test your beam move around it. Check that all polygons are drawn and that you don't see any crossing polygons.

This shows a lamp with a bad polygon display. This sort of problem happens quite often in the first and last sides of the polygon you draw.

If you go to the back of the lamp the 2 sides are not visible. This means that we must invert the drawing of these two sides to display properly.

From the grid select the side or sequence number you need to invert and click until the Draw method shows 'Inverted'.

If you click again in the sequence you will get the message 'Invisible'. This means the side is not drawn and you won't see it from any view point.