It looks ok to me.
FYI: rotate([45,45,45]) is equivalent to rotate([45,0,0]) rotate([0,45,0])
rotate([0,0,45]), so you can play with each component to discover why it
works as it does.
This type of rotation can be a bit counter intuitive if you're not used to
rotating stuff in 3D ;)
-Marius
--
View this message in context: http://forum.openscad.org/Do-3-45-turns-of-a-line-in-the-axis-make-it-a-space-diagonal-to-that-octant-tp11132p11159.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Isn't it the other way round ?, i.e. X first Z last so
rotate([0,0,45]) rotate([0,45,0]) rotate([45,0,0])
On 21 January 2015 at 00:13, kintel marius@kintel.net wrote:
It looks ok to me.
FYI: rotate([45,45,45]) is equivalent to rotate([45,0,0]) rotate([0,45,0])
rotate([0,0,45]), so you can play with each component to discover why it
works as it does.
This type of rotation can be a bit counter intuitive if you're not used to
rotating stuff in 3D ;)
-Marius
--
View this message in context:
http://forum.openscad.org/Do-3-45-turns-of-a-line-in-the-axis-make-it-a-space-diagonal-to-that-octant-tp11132p11159.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On Jan 20, 2015, at 19:32 PM, nop head nop.head@gmail.com wrote:
Isn't it the other way round ?, i.e. X first Z last so
rotate([0,0,45]) rotate([0,45,0]) rotate([45,0,0])
You’re right, my head was on backwards.
-Marius
Out of curiousity, is there a way to figure out how to rotate to get what
GeeBee expects?
:)
--
View this message in context: http://forum.openscad.org/Do-3-45-turns-of-a-line-in-the-axis-make-it-a-space-diagonal-to-that-octant-tp11132p11182.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I think not if I understand the question
, because the answer to "Do 3 45° turns of a line in the axis make it a
space diagonal to that octant" is no.
It takes only two rotations, one of 45 and the other of atan(sqrt(0.5)) for
the reason you showed above.
cube(50, center = true);
hull() {
sphere();
rotate([0,-atan(sqrt(0.5)), 45])
translate([100, 0, 0])
sphere();
}
On 21 January 2015 at 15:08, Bananapeel lunatica.xiaoyu@gmail.com wrote:
Out of curiousity, is there a way to figure out how to rotate to get what
GeeBee expects?
:)
--
View this message in context:
http://forum.openscad.org/Do-3-45-turns-of-a-line-in-the-axis-make-it-a-space-diagonal-to-that-octant-tp11132p11182.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Thank you, atan is the function I was looking for.
After thinking about it, I have understood that it is not possible to rotate
a cube in the way I was visualizing. In that case you would need a different
shape than a cube.
side = 10;
side_half = side/2;
opposite_over_adjacent = side_half / (side_half*sqrt(2));
rotate([45, atan(opposite_over_adjacent), 0])
cube([side, side, side], center = true);
--
View this message in context: http://forum.openscad.org/Do-3-45-turns-of-a-line-in-the-axis-make-it-a-space-diagonal-to-that-octant-tp11132p11184.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Side note: The atan2 function may be (more) useful as it takes into
consideration the sign of the y & x values.
See
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#atan2
Andrew.
--
View this message in context: http://forum.openscad.org/Do-3-45-turns-of-a-line-in-the-axis-make-it-a-space-diagonal-to-that-octant-tp11132p11185.html
Sent from the OpenSCAD mailing list archive at Nabble.com.