#๐Ÿ”’ how many triangles in a larger triangle algorithm help

43 messages ยท Page 1 of 1 (latest)

hollow helmBOT
#

@ebon solstice

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

fathom estuary
#

well - how do you count them?

#

i guess the start point is having a way of defining the triangle size... i'd say it's a "size 3" triangle

ebon solstice
#

ye thats right

fathom estuary
#

with a size 1 triangle, there are... 1 triangles

ebon solstice
#

for size 2 theres 5

#

and size 3 13 i think

fathom estuary
#

so how does that break down - a large, then 4 small?

ebon solstice
#

yes but my problem is how would i make it for n

fathom estuary
#

yes. so we're figuring out how it works

ebon solstice
#

ah alr

fathom estuary
#

how many smalls for a size 3?

ebon solstice
#

so num 3 is make from 1 large 3 mid and 9 small

#

right?

fathom estuary
#

yes

ebon solstice
#

the only pattern i found was that theres n^2 small ones and 1 large one

fathom estuary
ebon solstice
#

those are size 1, 2, 3 and 4 triangles?

fathom estuary
#

yes

#

there are 7x size 2 triangles in a size 4 triangle

ebon solstice
#

yes

#

and 3x size 3

#

wait

fathom estuary
#

so i think there's always 3x the next size down

ebon solstice
#

i only see 6x 2

fathom estuary
#

there's an upside down one as well

ebon solstice
#

oh i see it

#

gottcha

void pumice
ebon solstice
#

where do i go from here so it has:
16x 1
7x 2
3x 3
1x 4

fathom estuary
ebon solstice
#

where is the anothe x3 size in num 4 i only see 3?

ebon solstice
void pumice
#

Read the article for the algorithm

ebon solstice
#

ok

fathom estuary
#

hmmm maybe that's true - i just threw it together

ebon solstice
#

ah alr

fathom estuary
#

yeah that's another option - don't think it through, just copy off the internet like Steve says

ebon solstice
#

tbh i cant read math i that articale

void pumice
#

Or just read the article and think it through

hollow helmBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ how many triangles in a larger triangle algorithm help