discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: sweep in BOSL2

AM
Adrian Mariano
Thu, Sep 25, 2025 11:02 PM

To be a little bit more clear about what I mean, if you have an equilateral
triangle with a hypotenuse of length 10 and angle 27 degrees you could find
the coordinates by doing

pt = 10 * [cos(27), sin(27)];

But you could also find those points by doing

pt = zrot(27, [10,0]);

Both produce the same result, but the first one requires explicit
trigonometry and the second one is geometric.

There are a bunch of trigonometric relations in trigonometry.scad that
encode the contents of SOHCAHTOA, as well as the law of sines and the law
of cosines, but I think the ideal situation is that you are able to define
your model entirely by its geometry, without even having to use those.

On Thu, Sep 25, 2025 at 3:59 PM Robert Carlson lostinthetrees@me.com
wrote:

Excellent, can't tell you how many times I have had to look up one of
those rules in the last year or two.

-Bob

On Sep 25, 2025, at 18:37, Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:

There seem to be people who get a kick out of solving trig problems when
building their models. I would rather focus on the geometry when building a
model rather than computational details and I tend to think that one of the
jobs of BOSL2 is to do the trig for you. In some sense in you have to
resort to using trig it is a failure of the library.

On Thu, Sep 25, 2025 at 11:38 larry via Discuss <
discuss@lists.openscad.org> wrote:

On Thu, 2025-09-25 at 14:48 +0100, Roger Whiteley via Discuss wrote:

Trig, hmm.

There's a mnemonic we were taught which I still remember:

SOHCAHTOA

or sin (angle) = OPPOSITE/HYPOTENUSE

or cos (angle) = ADJACENT/HYPOTENUSE

or tan (angle) =OPPOSITE/ADJACENT

Remembering the mnemonic is easier, for my grey cells.  I've probably
used that more since taking up OpenSCAD than in the previous 50+ years,
I used it last week, to calculate the length of a line from a 3D object
rotated along an axis and projected onto the XY plane.  All so I could
put holes in right place.

Nice, but there's little chance I could remember it, and even less
chance I could apply it.

I will never forget how to look it up in BOSL2 or in an online triangle
calculator.

L


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

To be a little bit more clear about what I mean, if you have an equilateral triangle with a hypotenuse of length 10 and angle 27 degrees you could find the coordinates by doing pt = 10 * [cos(27), sin(27)]; But you could also find those points by doing pt = zrot(27, [10,0]); Both produce the same result, but the first one requires explicit trigonometry and the second one is geometric. There are a bunch of trigonometric relations in trigonometry.scad that encode the contents of SOHCAHTOA, as well as the law of sines and the law of cosines, but I think the ideal situation is that you are able to define your model entirely by its geometry, without even having to use those. On Thu, Sep 25, 2025 at 3:59 PM Robert Carlson <lostinthetrees@me.com> wrote: > Excellent, can't tell you how many times I have had to look up one of > those rules in the last year or two. > > -Bob > > On Sep 25, 2025, at 18:37, Adrian Mariano via Discuss < > discuss@lists.openscad.org> wrote: > > There seem to be people who get a kick out of solving trig problems when > building their models. I would rather focus on the geometry when building a > model rather than computational details and I tend to think that one of the > jobs of BOSL2 is to do the trig for you. In some sense in you have to > resort to using trig it is a failure of the library. > > On Thu, Sep 25, 2025 at 11:38 larry via Discuss < > discuss@lists.openscad.org> wrote: > >> On Thu, 2025-09-25 at 14:48 +0100, Roger Whiteley via Discuss wrote: >> > Trig, hmm. >> > >> > There's a mnemonic we were taught which I still remember: >> > >> > SOHCAHTOA >> > >> > or sin (angle) = OPPOSITE/HYPOTENUSE >> > >> > or cos (angle) = ADJACENT/HYPOTENUSE >> > >> > or tan (angle) =OPPOSITE/ADJACENT >> > >> > Remembering the mnemonic is easier, for my grey cells. I've probably >> > used that more since taking up OpenSCAD than in the previous 50+ years, >> > I used it last week, to calculate the length of a line from a 3D object >> > rotated along an axis and projected onto the XY plane. All so I could >> > put holes in right place. >> >> Nice, but there's little chance I could remember it, and even less >> chance I could apply it. >> >> I will never forget how to look it up in BOSL2 or in an online triangle >> calculator. >> >> L >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > >
AM
Adrian Mariano
Thu, Sep 25, 2025 11:03 PM

I meant a right triangle, not equilateral!

On Thu, Sep 25, 2025 at 7:02 PM Adrian Mariano avm4@cornell.edu wrote:

To be a little bit more clear about what I mean, if you have an
equilateral triangle with a hypotenuse of length 10 and angle 27 degrees
you could find the coordinates by doing

pt = 10 * [cos(27), sin(27)];

But you could also find those points by doing

pt = zrot(27, [10,0]);

Both produce the same result, but the first one requires explicit
trigonometry and the second one is geometric.

There are a bunch of trigonometric relations in trigonometry.scad that
encode the contents of SOHCAHTOA, as well as the law of sines and the law
of cosines, but I think the ideal situation is that you are able to define
your model entirely by its geometry, without even having to use those.

On Thu, Sep 25, 2025 at 3:59 PM Robert Carlson lostinthetrees@me.com
wrote:

Excellent, can't tell you how many times I have had to look up one of
those rules in the last year or two.

-Bob

On Sep 25, 2025, at 18:37, Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:

There seem to be people who get a kick out of solving trig problems when
building their models. I would rather focus on the geometry when building a
model rather than computational details and I tend to think that one of the
jobs of BOSL2 is to do the trig for you. In some sense in you have to
resort to using trig it is a failure of the library.

On Thu, Sep 25, 2025 at 11:38 larry via Discuss <
discuss@lists.openscad.org> wrote:

On Thu, 2025-09-25 at 14:48 +0100, Roger Whiteley via Discuss wrote:

Trig, hmm.

There's a mnemonic we were taught which I still remember:

SOHCAHTOA

or sin (angle) = OPPOSITE/HYPOTENUSE

or cos (angle) = ADJACENT/HYPOTENUSE

or tan (angle) =OPPOSITE/ADJACENT

Remembering the mnemonic is easier, for my grey cells.  I've probably
used that more since taking up OpenSCAD than in the previous 50+

years,

I used it last week, to calculate the length of a line from a 3D

object

rotated along an axis and projected onto the XY plane.  All so I could
put holes in right place.

Nice, but there's little chance I could remember it, and even less
chance I could apply it.

I will never forget how to look it up in BOSL2 or in an online triangle
calculator.

L


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I meant a right triangle, not equilateral! On Thu, Sep 25, 2025 at 7:02 PM Adrian Mariano <avm4@cornell.edu> wrote: > To be a little bit more clear about what I mean, if you have an > equilateral triangle with a hypotenuse of length 10 and angle 27 degrees > you could find the coordinates by doing > > pt = 10 * [cos(27), sin(27)]; > > But you could also find those points by doing > > pt = zrot(27, [10,0]); > > Both produce the same result, but the first one requires explicit > trigonometry and the second one is geometric. > > There are a bunch of trigonometric relations in trigonometry.scad that > encode the contents of SOHCAHTOA, as well as the law of sines and the law > of cosines, but I think the ideal situation is that you are able to define > your model entirely by its geometry, without even having to use those. > > > On Thu, Sep 25, 2025 at 3:59 PM Robert Carlson <lostinthetrees@me.com> > wrote: > >> Excellent, can't tell you how many times I have had to look up one of >> those rules in the last year or two. >> >> -Bob >> >> On Sep 25, 2025, at 18:37, Adrian Mariano via Discuss < >> discuss@lists.openscad.org> wrote: >> >> There seem to be people who get a kick out of solving trig problems when >> building their models. I would rather focus on the geometry when building a >> model rather than computational details and I tend to think that one of the >> jobs of BOSL2 is to do the trig for you. In some sense in you have to >> resort to using trig it is a failure of the library. >> >> On Thu, Sep 25, 2025 at 11:38 larry via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> On Thu, 2025-09-25 at 14:48 +0100, Roger Whiteley via Discuss wrote: >>> > Trig, hmm. >>> > >>> > There's a mnemonic we were taught which I still remember: >>> > >>> > SOHCAHTOA >>> > >>> > or sin (angle) = OPPOSITE/HYPOTENUSE >>> > >>> > or cos (angle) = ADJACENT/HYPOTENUSE >>> > >>> > or tan (angle) =OPPOSITE/ADJACENT >>> > >>> > Remembering the mnemonic is easier, for my grey cells. I've probably >>> > used that more since taking up OpenSCAD than in the previous 50+ >>> years, >>> > I used it last week, to calculate the length of a line from a 3D >>> object >>> > rotated along an axis and projected onto the XY plane. All so I could >>> > put holes in right place. >>> >>> Nice, but there's little chance I could remember it, and even less >>> chance I could apply it. >>> >>> I will never forget how to look it up in BOSL2 or in an online triangle >>> calculator. >>> >>> L >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> >>