-
Notifications
You must be signed in to change notification settings - Fork 100
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
What the x,y,z coordinates locations denotes (mid point of voxel or anything else)? #10
Comments
See pull request #11 . If you are using python 3, you need to fix the division to the correct integer division operator. The coordinates returned by |
I'll reply your question here. The indices are just integer indices of the voxels. So for a 32 by 32 by 32 model, the indices i,j,k will be from 0 to 31. They just represent the indices of each voxel in the model. To find all 8 vertices of a voxel, you can do something like this:
|
Got it. Thanks a lot. You literally save my work.
…On Mon, 18 Nov 2019, 11:54 p.m. Jingnan Shi ***@***.*** wrote:
I'll reply your question here. The indices are just integer indices of the
voxels. So for a 32 by 32 by 32 model, the indices i,j,k will be from 0 to
31. They just represent the indices of each voxel in the model.
To find all 8 vertices of a voxel, you can do something like this:
# lower left corner
x_n = i/dims[0]
y_n = j/dims[1]
z_n = k/dims[2]
x = scale*x_n + translate[0]
y = scale*y_n + translate[1]
z = scale*z_n + translate[2]
# upper right corner
x_n = (i+1)/dims[0]
y_n = (j+1)/dims[1]
z_n = (k+1)/dims[2]
x = scale*x_n + translate[0]
y = scale*y_n + translate[1]
z = scale*z_n + translate[2]
# and do something similar for the other 6 ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10?email_source=notifications&email_token=AJVES2WYKG7LFY3C47W4WZDQULMWPA5CNFSM4JODVBQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEELNOMQ#issuecomment-555145010>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJVES2URDQQP4M623CB7DSTQULMWPANCNFSM4JODVBQQ>
.
|
This might also help you: https://www.patrickmin.com/binvox/binvox.html I'm glad I can help. |
Thanks a lot for this also.
…On Mon, 18 Nov 2019, 11:59 p.m. Jingnan Shi ***@***.*** wrote:
This might also help you: https://www.patrickmin.com/binvox/binvox.html
I'm glad I can help.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10?email_source=notifications&email_token=AJVES2QZWNJ4EUXLF3KB3CDQULNJXA5CNFSM4JODVBQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEELN7NI#issuecomment-555147189>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJVES2X3IV3ZOGRTA2CEQALQULNJXANCNFSM4JODVBQQ>
.
|
What are these x,y,z coordinates locations, outputting by
binvox_rw.read_as_coord_array(f)
function. Are they mid point of any voxel or any vertices of a particular voxel. I want to find all the 8 vertices of a voxel. So please let me know the conversion formulas.The text was updated successfully, but these errors were encountered: