Creating a stage lighting Dynamic Component

I’m part of the way to creating a dynamic component for use in stage lighting design.

I’ve got this far:


Patt 264 lantern DC.skp (162.2 KB)

I’ve drawn a simplified version of one of our very old Patt 264 Strand Electric lanterns. I’ve developed DC Attributes and assigned three of them to Component Options for Left to Right Angle (relative to straight ahead on the green axis), Up-Down angle (downwards positive relative to horizontal), and Light Cone Angle (included angle of the light cone from the lantern, which is controllable within limits - not enforced in the DC, though I might add that later).

I’ve made four dotted line components for the boundaries of a very simplified version of the light cone of the lantern, which are angled at half the light cone angle away from the centreline of the cone, and these work fine to change angle when I change the component option for the light cone angle.

I’ve also drawn a translucent cone (only 12 faces), and set its scale handles to show only in its green-blue plane, so as to allow me to use the scale tool about centre to broaden or narrow the cone shape.

But what I’d like to do is to be able to have the cone component shrink or enlarge with the component option for its angle, and I can’t see how to do that, or even know if it’s possible in a DC.

As an alternative, I could use more component dashed lines - say 8 or 12 instead of the 4 I’ve used so far - to simulate the cone edges, and calculate the angles to place them, and if I include a parameter for the height of the lantern above the stage, even to adjust the lengths so they end at stage level (more or less). But that gets tedious and the trigonometry while fairly straightforward is error prone when creating the DC formulae to position them.

Can anyone see a better way of doing it? @pcmoor perhaps? Anyone else?

Further exploration of possibilities:

Trying to rotate a component by setting RotX, RotY and RotZ…

If I set one, say RotX, then set another, say RotY, the first one (RotX) is reset to zero. Why can’t I set rotation about more than one axis at a time?

Do I have to nest one component inside another to get more than one axis of rotation of the subcomponent?

For the rotation the values can be locked to custom
attributes that the user edits
preliminary beam.skp (29.5 KB)

consider this line connection idea

find screen (1).skp (127.0 KB)

move or copy/move the projector

Many thanks. I had found a workaround, but it needs an additional container component, so I will change it following your first example.

I see what your second example does, but am not sure how I might use it. Will think on it overnight.

Do you know of a way of changing the included angle of a translucent cone in a DC?

I’m working on drawing the edges of a cone, and can get that to work with a selectable number of segments in the cone. Trying now to adjust the edge lengths so they all stop at the stage. I can see in principle how to do it, but haven’t finished yet.


Lantern DC v1.skp (217.1 KB)

The edge lengths adjust for different lantern heights and cone angle in this version, and meet the stage exactly at the central plane of the cone as those change.

But I still have to adjust the remaining edges so that they end at stage level, depending on their position round the cone. I can see in principle how to do it, but haven’t time tonight to finish the formulae.

I think my Cone Length component option is now redundant, replaced by a calculation based on the lantern height above the stage, and the Up/Down angle.

I think I’ve now got it ‘good enough’ to be useful. I’ve saved the model back to v2017 to make it more widely usable.


Lantern DC v2.skp (487.0 KB)

You can now set the lantern height, the angle up or down, left and right, choose the number of segments for the light cone edges, and see a ‘light pool’ on the stage floor.

There’s a fixed offset between the ‘height’ of the lantern to its fixing point on the top of the hanging bracket of 14" to the apex of the light cone.

Perhaps that ought to be a component option, as sometimes you hang the lantern on top of a vertical pole, rather than underneath a horizontal one above the stage, and different lantern patterns will have different offsets.

The cone edges and the light pool are a close match for larger values of UpDownAngle, but at smaller values, the width of the ‘pool’ matches the width of the cone, but not at the same position. Good enough though, I think.

I may tidy up the internal formulae slightly - for example, to calculate the HalfConeAngle at the top level where it is first now needed, rather than having some lower level calculations repeat HalfConeAngle = ConeAngle/2.0, and it’s probably slightly quicker to calculate HalfConeAngle = 0.5 * ConeAngle rather than do division.

And I need to draw better models than a rectangular box for different lanterns.

But these are minor details - the DC is doing what I wanted it to, ‘well enough’ to be useful.

A few examples of different parameters and the results.

1 Like

And (barring finding bugs, or making small enhancements) here’s my final version for the moment, based on our elderly Patt 264 spotlights.

Found a bug in component originally posted here. See post 11 later for a version that fixes this bug.

One small issue still puzzles me. I have the two Height parameters set to show their values in End User Model Units.

Units are set to Architectural. But both Heights are showing only in inches. Is that a known ‘feature’ of DCs? I thought that closing and opening the Component Options window might correct this but it doesn’t. I can enter a value in feet, or feet and inches, but it still displays in inches.

Internally Dynamic components have two measuring unit options: Inches and centimeters. Whatever the internal unit, you can set the fields shown in the Component Options dialog to show units of your choice. I think the best choice is “End user’s Model units”. This makes the unit display follow whatever is specified in Model Info.

I’ve selected “End user’s model units” with Architectural units chosen in Model Info, but they are not showing in Component Options as feet and inches, just inches.

I wonder if you have the “Display units format” box unchecked in Model Info. It shouldn’t apply to Architectural units but having it unchecked in any other unit formats makes the Dynamic Component unit settings all to revert to Inches. It is an old bug that hasn’t been fixed in the whole lifetime of DCs. This might be another bug related to the same thing.

No, that box is checked in Model Info (but grayed out).

Found a bug in the earlier posted component and fixed it - the ‘light pool’ didn’t sit on the stage floor unless the lantern height was at the original value of 14’.

Adding light pool Z = - parent!LanternHeight fixed that.

But I’m left with one small problem.

To position the ‘light pool’ ellipse on the stage floor, I calculate its Y position as:
=(parent!LanternHeight - parent!HeightOffset)/tan(parent!UpDownAngle + parent!HalfConeAngle)

Unfortunately, if UpDownAngle + HalfConeAngle = 90° I get a divide by zero error showing in the component attribute, and the light pool won’t position correctly, although the tangent of 90 is undefined/infinite not zero.

How do I trap for this error?

I tried an IF statement
Y = IF(ABS(parent!UpDownAngle + parent!HalfConeAngle - 90) < 0.1, 0.0, (parent!LanternHeight - parent!HeightOffset)/ tan(parent!UpDownAngle + parent!HalfConeAngle))

But it appears that even if the IF statement evaluates to TRUE, the rest of the expression is evaluated anyway and so the error isn’t trapped.

Any suggestions for how to fix this?

I’ve put a warning note in the Component Options Description field, but would like to trap the error if possible.

See post 13 for a further enhancement to trap the error.

ang = UpDownAngle + HalfConeAngle

if(ang<90.01, smallest(89.99,ang),largest(90.01,ang))

will give a range either side and avoids the dreaded 90

1 Like

Thank you, Philip. I can how see that should work.

And it does, once I’d worked out where to put it.

Latest fixed version:
Patt 264 lantern DC.skp (272.4 KB)

Well, I now have a usable model.

But it is annoying me that my formula for the length of the cone edges of the beam is only very approximately correct.

I’ve taken an example with ‘round’ measures of the different lengths and angles, to make it easier
to get an accurate formula for the cone edge lengths round the cone.


I’ve set the apex of the light cone at 10’ above the stage (LanternHeight - HeightOffset = 10'), the lantern angled down 45°, so UpDownAngle = 45, and the included cone angle 30°, so the HalfConeAngle = 15.

The RotZ angle (A-P-Q) varies with the copy number of the edge, starting with RotZ = 0 at the edge labelled A, and is 30° at edge B, and with 12 segments, it increments by 30° per edge copy.

My (inaccurate) formula for the length of a cone edge is

LenZ = ((parent!LanternHeight - parent!HeightOffset)/ cos(90 - parent!UpDownAngle - cos(parent!RotZ + 90)* parent!HalfConeAngle))/cos(parent!HalfConeAngle)

and is clearly not quite accurate except when RotZ = 0 and 180.

It is too long everywhere else, as you can see at edges C and D.

Can anyone else figure out the maths better than my guess? I’d be grateful if so. The model is usable, but it irritates me that I haven’t got it quite right, and can’t see how to fix it.

The value for the length that I have set does go up and down in the right sort of way as RotZ increases from 0 to 360°, getting longest at RotZ = 90 and smallest at RotZ = 270. It is accurate at RotZ = 0 and `RotZ = 180.

What should it be in between? Any improvement gratefully received!

Here’s the current model including the diagram lines and labelling, saved back to v 2017:
Patt 264 lantern DC - with diagram.skp (414.8 KB)

Impressive progress on your Patt 264 lantern DC! For adjusting the cone component’s size with the angle option, consider using the “lenx,” “leny,” and “lenz” attributes in your dynamic component formulae. These represent the scaling factors along the x, y, and z axes respectively. You can link these attributes to your angle parameter to achieve the desired effect.