Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
morphogencc opened this issue Nov 15, 2014 · 3 comments

Comments

@morphogencc
Copy link

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

@Dewb
Copy link
Owner

Dewb commented Nov 17, 2014

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.

@Dewb Dewb changed the title Range of pixel coordinates Tower object should expose properties representing the maximum range of the various pixel coordinates Nov 17, 2014
@morphogencc
Copy link
Author

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:
#16 (comment)

@Dewb
Copy link
Owner

Dewb commented Nov 17, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants