Dewb / CosmicPraise

The BRC 2014 six o'clock keyhole installation - a 52' climbable steel tower covered in LEDs with a cosmic-ray-detecting spark chamber, covered in LEDs
http://douglasruuska.com/cosmic-praise
6 stars 5 forks source link

Tower object should expose properties representing the maximum range of the various pixel coordinates #16

Open morphogencc opened 9 years ago

morphogencc commented 9 years ago

What's the range of pixel coordinates in cartesian and cylindrical coordinates? Are they in real space or scaled {0..1}?

Dewb commented 9 years ago

In the current layout JSON, they are in rough meters. If you look at effects/whichlight.py Kawan experimentally determined the ranges of z and r. Center of sculpture base is at 0,0,0. It might be good for the tower object to precompute and expose these ranges, because they will change if we adjust or redesign parts of the structure.

morphogencc commented 9 years ago

I might add that in my next PR too (if you don't mind). Right now I just compute the max and min on every call to an effect, like:

max_z = 0;
    min_z = 1000000000000;

    for pixel in tower.middle:
        max_z = max(pixel['z'], max_z)
        min_z = min(pixel['z'], min_z)

I think I would go about adding a member to each of tower.base, tower.middle, tower.spire, etc. so that they each have an exposed parameter of the format max_z or max_theta. Do you have a suggestion for where this would go in the code? Presumably sometime after the model is loaded.

nathan

On Mon, Nov 17, 2014, at 05:31 PM, Michael Dewberry wrote:

In the current layout JSON, they are in rough meters. If you look at effects/whichlight.py Kawan experimentally determined the ranges of z and r. Center of sculpture base is at 0,0,0. It might be good for the tower object to precompute and expose these ranges, because they will change if we adjust or redesign parts of the structure.


Reply to this email directly or view it on GitHub: https://github.com/Dewb/CosmicPraise/issues/16#issuecomment-63388841

Dewb commented 9 years ago

Sure, I was hoping you might :) Probably makes sense to calculate the limits as the model is being populated with the layout JSON.