### solar cell mount math fail

GH
gene heskett
Tue, May 23, 2023 9:06 PM

On 5/23/23 16:21, Jordan Brown wrote:

If I understand correctly, you are asking for the "diameter" of a
triangle with sides 72 units.  Right?

Precisely.

First, to be clear, the diameter here is the diameter of the circle that
encloses the triangle.

Consider this diagram:

Here's a one-paragraph introduction to trigonometry:

``````  The basic trigonometric functions are defined for a right triangle
(a triangle with one angle 90°).  (In this diagram, we're going to
work with the triangle ABC.)
They are functions of one of the two other angles. (Either BAC or
ABC in the diagram above, but we're going to concentrate on BAC.)
The hypotenuse is the long side, the one opposite the 90° angle.
(AB in the diagram.)
The adjacent side is the side that connects to the angle that you're
working with, that isn't the hypotenuse.  (For angle BAC, this is AC.)
The opposite side is the side that *doesn't* connect to the angle
that you're working with.  (For angle BAC, this is BC.)
The sine of an angle is the length of the opposite side divided by
the length of the hypotenuse.  (The sine of BAC is BC/AB.)
The cosine is the adjacent side divided by the hypotenuse. (The
cosine of BAC is AC/AB.)
The tangent is opposite divided by adjacent. (The tangent of BAC is
BC/AC.)
The "arc" functions (arcsine, arccosine, arctangent) take the ratio
as an argument, and return the angle.
``````

Now we can do your math.

(Values below to three significant figures.)
You want the side BD to be 72 units.
BC is half of that, 36 units.
The angle BAD is one third of a circle, 120°.
The angle BAC is one sixth of a circle, 60°.

sin(BAC) = BC/AB
sin(BAC)AB = BC  (multiply both sides by AB)
AB = BC/sin(BAC)  (divide both sides by sin(BAC))
AB = 36 / sin(60)  (substitute in the actual values of BC and BAC)
AB = 36 / 0.866  (value of sin(60) from the sin() function)
AB = 41.6 = radius of the circle
2
41.6 = 83.2 = diameter of the circle

which is the answer obtained from the original suggestion once the
extraineous *'s were removed.

A few more hints that can help to sanity-check your results:

``````  Note that the opposite and adjacent sides are always smaller than
the hypotenuse, so sine and cosine are between zero and one.
(Actually, between -1 and +1 when you consider triangles in the
Also note that when the angle is small, the sine is small, and when
the angle is large the sine is large.
And the other way around for cosine.Yup>
``````

So, sanity-checking our result...

``````  We expect the radius AB to be larger than the half-side BC.
We're dividing BC by a cosine, which is a number less than 1, so the
result will be larger than BC.
Check.
``````

That kind of sanity checking won't catch all errors, but it'll catch
cases where you divided instead of multiplying, and things like that.

Note that this basic diagram and set of operations will tell you all
sorts of things about the dimensions of regular polygons.  For a polygon
with n sides, BAD is 360/n, BAC is half of that, and you can use the
same sine and cosine ratios to relate any of the dimensions to each other.

For instance, if you know the distance that you want to the center of a
side, AC in this diagram, and you want the "radius" that you would pass

BAC = 360/n/2
cos(BAC) = AC/AB
AB * cos(BAC) = AC
AB = AC / cos(BAC)

Thus for a regular polygon with n sides, where you know the length of
AC, the radius AB is AC/cos(360/n/2).

Again, sanity checking...

``````  We expect AB to be larger than AC.
We're dividing AC by a cosine, so the result will be larger than AC.
Check.

The more sides we have, the closer AB and AC will be.
The more sides we have, the smaller the angle BAC will be.
Smaller angles yield larger cosines; as the angle approaches zero
the cosine approaches 1.
Thus when the number of sides is large, the cosine approaches 1.
As the cosine approaches 1, AC/cos(BAC) will approach AC.
Check.
``````

UNITS NOTE:  OpenSCAD works in degrees.  Most other programming
you're doing this math using some other tool, make sure you convert
appropriately:  360° = 2*PI radians.  Most environments provide
conversion functions.

Printed FFS, thank you,

## Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

JB
Jordan Brown
Tue, May 23, 2023 11:51 PM

On 5/23/2023 2:06 PM, gene heskett wrote:

which is the answer obtained from the original suggestion once the
extraineous *'s were removed.

... which is a nice double check.

I did see that original response, but it was magic - it was the AI's
answer to that particular problem, with no explanation of why it was the
answer or how to answer related questions.  I thought I'd fill in that
missing part.  One unobvious connection is that sin(60) is sqrt(3)/2 -
but that doesn't tell you how to do similar math with squares,
pentagons, et cetera.

Also, I don't know whether ChatGPT will ever get basic math wrong, but
it does get facts about the real world wrong
https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence),
so I would double-check anything that it says.

The descriptions of the ChatGPT algorithm seem to say that it puts
together snippets that it decides "go together" based on the data that
it had been fed.  They imply that it doesn't actually understand
anything.  It yields amazing results, but has severe limitations.  It
seems like it is in a sense Dissociated Press
https://en.wikipedia.org/wiki/Dissociated_press on ultra-steroids.

On 5/23/2023 2:06 PM, gene heskett wrote: > which is the answer obtained from the original suggestion once the > extraineous *'s were removed. ... which is a nice double check. I did see that original response, but it was magic - it was the AI's answer to that particular problem, with no explanation of why it was the answer or how to answer related questions.  I thought I'd fill in that missing part.  One unobvious connection is that sin(60) is sqrt(3)/2 - but that doesn't tell you how to do similar math with squares, pentagons, et cetera. Also, I don't know whether ChatGPT will ever get basic math wrong, but it *does* get facts about the real world wrong <https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)>, so I would double-check anything that it says. The descriptions of the ChatGPT algorithm seem to say that it puts together snippets that it decides "go together" based on the data that it had been fed.  They imply that it doesn't actually understand anything.  It yields amazing results, but has severe limitations.  It seems like it is in a sense Dissociated Press <https://en.wikipedia.org/wiki/Dissociated_press> on ultra-steroids.
MA
Mike Aubury
Wed, May 24, 2023 12:22 PM

for completeness, ChatGPT did give full workings, I summarized :)

"x" in this case is the radius, so
c = (4r) / √3
becomes
c = (2d) / √3

Q: I have a triangle with corners of 120 degrees, 30 degrees and 30 degrees
If the length of the shortest sides are x, what is the formula for the
longest side

A:
In a triangle, the sum of the angles is always 180 degrees. Given that you
have a triangle with angles of 120 degrees, 30 degrees, and 30 degrees, we
can conclude that it is an obtuse triangle. In an obtuse triangle, the
longest side is opposite the obtuse angle.

To find the formula for the longest side, let's label the angles A, B, and
C, and the sides a, b, and c, respectively, with lowercase letters
representing the side opposite their corresponding angle. In this case, we
can assign 120 degrees to angle A, 30 degrees to angles B and C, and the
length of the shortest sides as x.

Using the Law of Sines, which relates the lengths of the sides of a
triangle to the sines of its angles, we have:

a/sin(A) = b/sin(B) = c/sin(C)

Substituting the known values, we get:

x/sin(120°) = b/sin(30°) = c/sin(30°)

Now, let's focus on the longest side, c. Since it is opposite the angle 120
degrees, we can rewrite the equation as follows:

c/sin(120°) = x/sin(30°)

sin(120°) is equal to sin(180° - 120°), which is sin(60°). Also, sin(30°)
is equal to 1/2. Substituting these values, we have:

c/sin(60°) = x/(1/2)

sin(60°) is equal to √3/2, so the equation becomes:

c/(√3/2) = 2x/1

Simplifying further, we get:

c = (2x * 2) / √3

c = (4x) / √3

Therefore, the formula for the longest side, c, in terms of the length of
the shortest side, x, is:

c = (4x) / √3

On Wed, 24 May 2023 at 00:51, Jordan Brown openscad@jordan.maileater.net
wrote:

On 5/23/2023 2:06 PM, gene heskett wrote:

which is the answer obtained from the original suggestion once the
extraineous *'s were removed.

... which is a nice double check.

I did see that original response, but it was magic - it was the AI's
answer to that particular problem, with no explanation of why it was the
answer or how to answer related questions.  I thought I'd fill in that
missing part.  One unobvious connection is that sin(60) is sqrt(3)/2 - but
that doesn't tell you how to do similar math with squares, pentagons, et
cetera.

Also, I don't know whether ChatGPT will ever get basic math wrong, but it
does get facts about the real world wrong
https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence),
so I would double-check anything that it says.

The descriptions of the ChatGPT algorithm seem to say that it puts
together snippets that it decides "go together" based on the data that it
had been fed.  They imply that it doesn't actually understand anything.  It
yields amazing results, but has severe limitations.  It seems like it is in
a sense Dissociated Press
https://en.wikipedia.org/wiki/Dissociated_press on ultra-steroids.

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

for completeness, ChatGPT did give full workings, I summarized :) "x" in this case is the radius, so c = (4r) / √3 becomes c = (2d) / √3 Q: I have a triangle with corners of 120 degrees, 30 degrees and 30 degrees If the length of the shortest sides are x, what is the formula for the longest side A: In a triangle, the sum of the angles is always 180 degrees. Given that you have a triangle with angles of 120 degrees, 30 degrees, and 30 degrees, we can conclude that it is an obtuse triangle. In an obtuse triangle, the longest side is opposite the obtuse angle. To find the formula for the longest side, let's label the angles A, B, and C, and the sides a, b, and c, respectively, with lowercase letters representing the side opposite their corresponding angle. In this case, we can assign 120 degrees to angle A, 30 degrees to angles B and C, and the length of the shortest sides as x. Using the Law of Sines, which relates the lengths of the sides of a triangle to the sines of its angles, we have: a/sin(A) = b/sin(B) = c/sin(C) Substituting the known values, we get: x/sin(120°) = b/sin(30°) = c/sin(30°) Now, let's focus on the longest side, c. Since it is opposite the angle 120 degrees, we can rewrite the equation as follows: c/sin(120°) = x/sin(30°) sin(120°) is equal to sin(180° - 120°), which is sin(60°). Also, sin(30°) is equal to 1/2. Substituting these values, we have: c/sin(60°) = x/(1/2) sin(60°) is equal to √3/2, so the equation becomes: c/(√3/2) = 2x/1 Simplifying further, we get: c = (2x * 2) / √3 c = (4x) / √3 Therefore, the formula for the longest side, c, in terms of the length of the shortest side, x, is: c = (4x) / √3 On Wed, 24 May 2023 at 00:51, Jordan Brown <openscad@jordan.maileater.net> wrote: > On 5/23/2023 2:06 PM, gene heskett wrote: > > which is the answer obtained from the original suggestion once the > extraineous *'s were removed. > > > ... which is a nice double check. > > I did see that original response, but it was magic - it was the AI's > answer to that particular problem, with no explanation of why it was the > answer or how to answer related questions. I thought I'd fill in that > missing part. One unobvious connection is that sin(60) is sqrt(3)/2 - but > that doesn't tell you how to do similar math with squares, pentagons, et > cetera. > > Also, I don't know whether ChatGPT will ever get basic math wrong, but it > *does* get facts about the real world wrong > <https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)>, > so I would double-check anything that it says. > > The descriptions of the ChatGPT algorithm seem to say that it puts > together snippets that it decides "go together" based on the data that it > had been fed. They imply that it doesn't actually understand anything. It > yields amazing results, but has severe limitations. It seems like it is in > a sense Dissociated Press > <https://en.wikipedia.org/wiki/Dissociated_press> on ultra-steroids. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Wed, May 24, 2023 5:26 PM

On 5/23/2023 4:51 PM, Jordan Brown wrote:

Also, I don't know whether ChatGPT will ever get basic math wrong, but
it does get facts about the real world wrong
https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence),
so I would double-check anything that it says.

Rogier Wolff points out privately that ChatGPT does get basic math wrong.

Note that in the article ChatGPT blames its ~20% error on floating point
imprecision in Python.  That's totally bogus.

I asked ChatGPT 3.5 the same question that the writer did, and it got it
closer, but still wrong by about 0.1%.  It said

``````t ≈ (0.6931 / 0.2624) ≈ 2.639.
``````

but it isn't; it's actually more than 2.641.

what is 0.6931 divided by 0.2624?

<<< 0.6931 divided by 0.2624 is approximately equal to 2.639.

Let's multiply both of them by 10,000.

What is 6931 divided by 2624?

<<< 6931 divided by 2624 is approximately equal to 2.64125.

This is pretty poor.

On 5/23/2023 4:51 PM, Jordan Brown wrote: > Also, I don't know whether ChatGPT will ever get basic math wrong, but > it *does* get facts about the real world wrong > <https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)>, > so I would double-check anything that it says. Rogier Wolff points out privately that ChatGPT does get basic math wrong. https://medium.datadriveninvestor.com/i-found-a-simple-math-mistake-in-chatgpt-ac83a7994f10 Note that in the article ChatGPT blames its ~20% error on floating point imprecision in Python.  That's totally bogus. I asked ChatGPT 3.5 the same question that the writer did, and it got it closer, but still wrong by about 0.1%.  It said t ≈ (0.6931 / 0.2624) ≈ 2.639. but it isn't; it's actually more than 2.641. >>> what is 0.6931 divided by 0.2624? <<< 0.6931 divided by 0.2624 is approximately equal to 2.639. Let's multiply both of them by 10,000. >>> What is 6931 divided by 2624? <<< 6931 divided by 2624 is approximately equal to 2.64125. This is pretty poor.
PC
Patrick Callahan
Thu, May 25, 2023 12:39 PM

while chatGPT is pretty good at math, it can make mistakes and give wrong
answers.  Kind of like a high school student, or... me.

On Tue, May 23, 2023 at 4:41 AM Mike Aubury mike@aubit.com wrote:

c = (2**72*) / sqrt(3);

cylinder(d=c,h=20, \$fn=3);

On Tue, 23 May 2023 at 09:22, gene heskett gheskett@shentel.net wrote:

Greetings all;

Math failure is 100% me. I got some algebra in the 7th and 8th graes,
but the male teacher was far more interested in getting into the girls
panties than he was in teaching algebra. Invited to leave town by an
irate father with a 12 gauge before the 8th grade was done.

I've made a panel and printed it to hold an aliexpress 6 volt solar
cell. This after a mailbox remote alarm dissolved a couple of AA
Durocells in 2 months. Messy cleanup.

Its a hair short of the cell length but that is the max of my printer
bed diagonally. This holder is 71.5mm wide. And it should tilt the cell
so its roughly broadside to the sun at local noon, when glued to the
back of a plastic picket fence rail. I want it inside the yard, semi out
of site as I'll bury the cable to power the gizmo on the inside of the
mailbox door.

A cylinder with an \$fn=3; is the nominal tilt, giving a triangle. then
hollow it for 1mm walls and maybe 10% infill with another cylinder
inside it but 2mm shorter and 2mm smaller d.

what is my cylinders d= to get 72mm wide outer walls?

## Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

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

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

while chatGPT is pretty good at math, it can make mistakes and give wrong answers. Kind of like a high school student, or... me. On Tue, May 23, 2023 at 4:41 AM Mike Aubury <mike@aubit.com> wrote: > I asked chatgpt > > c = (2**72*) / sqrt(3); > > cylinder(d=c,h=20, \$fn=3); > > On Tue, 23 May 2023 at 09:22, gene heskett <gheskett@shentel.net> wrote: > >> Greetings all; >> >> Math failure is 100% me. I got some algebra in the 7th and 8th graes, >> but the male teacher was far more interested in getting into the girls >> panties than he was in teaching algebra. Invited to leave town by an >> irate father with a 12 gauge before the 8th grade was done. >> >> I've made a panel and printed it to hold an aliexpress 6 volt solar >> cell. This after a mailbox remote alarm dissolved a couple of AA >> Durocells in 2 months. Messy cleanup. >> >> Its a hair short of the cell length but that is the max of my printer >> bed diagonally. This holder is 71.5mm wide. And it should tilt the cell >> so its roughly broadside to the sun at local noon, when glued to the >> back of a plastic picket fence rail. I want it inside the yard, semi out >> of site as I'll bury the cable to power the gizmo on the inside of the >> mailbox door. >> >> A cylinder with an \$fn=3; is the nominal tilt, giving a triangle. then >> hollow it for 1mm walls and maybe 10% infill with another cylinder >> inside it but 2mm shorter and 2mm smaller d. >> >> what is my cylinders d= to get 72mm wide outer walls? >> >> Cheers, Gene Heskett. >> -- >> "There are four boxes to be used in defense of liberty: >> soap, ballot, jury, and ammo. Please use in that order." >> -Ed Howdershelt (Author, 1940) >> If we desire respect for the law, we must first make the law respectable. >> - Louis D. Brandeis >> Genes Web page <http://geneslinuxbox.net:6309/> >> _______________________________________________ >> 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 >
PC
Patrick Callahan
Thu, May 25, 2023 12:45 PM

and no it wasn't my mistake.  GPT actually apologized, or tried to.

https://chat.openai.com/c/36514891-a631-413a-b3e5-af37a919349c

On Thu, May 25, 2023 at 8:39 AM Patrick Callahan pat.callahan1@gmail.com
wrote:

while chatGPT is pretty good at math, it can make mistakes and give wrong
answers.  Kind of like a high school student, or... me.

On Tue, May 23, 2023 at 4:41 AM Mike Aubury mike@aubit.com wrote:

c = (2**72*) / sqrt(3);

cylinder(d=c,h=20, \$fn=3);

On Tue, 23 May 2023 at 09:22, gene heskett gheskett@shentel.net wrote:

Greetings all;

Math failure is 100% me. I got some algebra in the 7th and 8th graes,
but the male teacher was far more interested in getting into the girls
panties than he was in teaching algebra. Invited to leave town by an
irate father with a 12 gauge before the 8th grade was done.

I've made a panel and printed it to hold an aliexpress 6 volt solar
cell. This after a mailbox remote alarm dissolved a couple of AA
Durocells in 2 months. Messy cleanup.

Its a hair short of the cell length but that is the max of my printer
bed diagonally. This holder is 71.5mm wide. And it should tilt the cell
so its roughly broadside to the sun at local noon, when glued to the
back of a plastic picket fence rail. I want it inside the yard, semi out
of site as I'll bury the cable to power the gizmo on the inside of the
mailbox door.

A cylinder with an \$fn=3; is the nominal tilt, giving a triangle. then
hollow it for 1mm walls and maybe 10% infill with another cylinder
inside it but 2mm shorter and 2mm smaller d.

what is my cylinders d= to get 72mm wide outer walls?

## Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.