#help-23

1 messages · Page 350 of 1

glacial pine
#

i got 11, im not sure what i did wrong

safe radishBOT
glacial pine
fathom adder
#

24/3 = 8 not 6

glacial pine
#

oh my god.

safe radishBOT
#

@glacial pine Has your question been resolved?

#
Channel closed

Closed by @glacial pine

Use .reopen if this was a mistake.

#
Available help channel!

Send your question here to claim the channel.

Remember:
Ask your math question in a clear, concise manner.
Show your work, and if possible, explain where you are stuck.
Do not immediately ping people or roles. After 15 minutes, feel free to ping <@&286206848099549185> once.
• Type the command .close to free the channel when you're done.
• Be polite and have a nice day!

Read #❓how-to-get-help for further information on how to ask a good question, and about conduct in the question channels.

left gyro
#

.@tulip plover no thats not correct, you find the h by subtracting √3 repeatedly, just using 48 and 24 is not going to cut it
use 48 - 14√3
(also I just woke up)

tulip plover
tulip plover
#

the smaller triangle should always have equal gaps from the bigger one as long as it's in the middle?

left gyro
#

thats not true

tulip plover
#

so then I need to figure

left gyro
#

oh btw did you sleep

tulip plover
#

which smaller ones aren't available

#

yes

left gyro
#

great, because youre asking questions we already answered

left gyro
tulip plover
#

decrease it

left gyro
#

ok lets be more specific on this

tulip plover
#

by sqrt 3

left gyro
#

that is not at all a helpful answer

#

there you go

#

moving it in general to the right requires that you decrease h

tulip plover
#

yes and if we do that 14 times

#

it will move 14 blocks inward

#

but you said that doesn't make the gaps equal

left gyro
#

I didnt say that

left gyro
#

you did 24 instead of 48 - 14√3

tulip plover
#

no I didn't

#

I was talking about what you were talking

left gyro
#

then in that case, the answer is also no

#

you need to account for the fact that the resulting triangle that's generated is not centered vertically

#

wait

tulip plover
#

that's why I was assuming that it is in the center when asking

left gyro
#

oh that's how we can do this

left gyro
#

alr this is (w, h) = (0, 34.5)

#

now say we want a concentric triangle that is close to half the size, with exactly equal gaps

#

hold on Ill get a proper example of the triangle first

#

@tulip plover here we go

#

hopefully its evident from the picture what I did to create the triangle

tulip plover
#

the same thing I've been saying?

left gyro
#

tell me

#

how many times did I subtract √3?

tulip plover
#

that is not what I was asking about

left gyro
#

if you dont know the number of times

tulip plover
#

you did it 7 times

#

what I am asking about

#

is we know that h - x√3 will decrease it by one and make it smaller but what I am asking is how do we know that the smaller triangle is going to have equal gaps between it and the bigger one because as you said it's not always going to be equal gaps so we need to isolate all the ones that are equal and exclude the ones that aren't equal

left gyro
#

I am talking in a general sense

tulip plover
#

so then tell for this tool specifically

left gyro
#

for this tool specifically, the statement is still not true beause subtracting √3 is not the only thing you can do

#

you need to specifically talk about subtracting √3 for the statement to be true

#

and there the gaps are indeed equal

left gyro
tulip plover
#

for every √3 h is decreased by from the bigger triangle the smaller triangle will always have equal gaps with the bigger triangle

left gyro
#

I thought 48 - 14√3 was correct, but its not

#

it would have equal gaps but it wouldnt be of the correct size

tulip plover
#

hmm

#

what do you mean not the correct size?

#

distortion as it gets smaller?

left gyro
#

because although its close to h/2,

#

the block gaps only align with the bottom half of the triangle

#

but we need them to align with the middle half instead

#

so we need to pick a different size, then cut it off at the bottom, for the blocks to align properly

#

simply making an h/2 triangle by subtracting √3 from h, then moving it upwards, wont work

tulip plover
#

so a bigger triangle that starts at the base of the bigger triangle?

left gyro
#

a bigger triangle where (w, h) is at the tip of the smaller triangle's position

#

my calculator is lagging, Im fixing that rn but Ill show a better example

#

to generate this triangle here,

#

first, the smaller triangle in the center has (w, 2/3 h)

#

but I cut it off at the bottom so it doesnt go all the way

#

the purple triangle is really a triangle with (w, 1/2 h) shifted upwards by 1/6 h

left gyro
#

which leads to n ≈ h / (3√3)

#

this is why 7 works for 34.5

#

now there is something sneaky we can do here

#

remember how we said earlier that rational approximations of √3 were too large to be usable?

tulip plover
#

are you going to scale them down?

left gyro
#

not exactly

#

Im going to use a multiple of √3 for the height

left gyro
#

and if we pick the correct multiple, we can see that h is not far off from an integer height

#

so it looks alright

tulip plover
#

I see

left gyro
#

if there arent many terms in the continued fraction,

#

the denominators are more usable

#

but we dont need to rely on these actually

#

you could just keep testing various multiples of √3 until its close to an integer

left gyro
tulip plover
#

so trial and error is unavoidable?

left gyro
#

if you want to avoid trial and error, use a continued fraction

left gyro
#

so 15√3 ≈ 26

#

do you know how to make this continued fraction manually?

#

wait nvm you dont need to know that

#

you could just start from here and erase terms since 97/56 is too large

#

that means 7/4 and 26/15

#

so really just 26/15 since 7/4 is too small

tulip plover
#

isn't it just multiplying the numerator and denominator with the same value?

left gyro
#

not really

#

here are the first steps

#

you start with the number
then you add/subtract it until it is at its closest to 0
then you 1/
then you repeat

#

because √3 is whats known as "quadratic" (its a solution to a quadratic equation), the continued fraction eventually takes on a pattern

#

so repeated steps will do this

#

regardless, when you want to stop the method, you can see in the above that this is supposed to = 0

#

put = 0 at the end, then solve for √3

tulip plover
#

I see

left gyro
#

here's the end result

#

you can see theres a pattern here so you dont have to do this the next time around

#

this pattern happens for square roots

#

due to our process, you can imagine that this is in fact a sequence that can converge to √3

#

if you solve for the limit, you get ±√3

tulip plover
#

yes I see

left gyro
#

so this is definitely a sequence that converges to √3, and (unprovenly) also gives the best rational approximations at each step

tulip plover
#

so x approaching sqrt 3?

left gyro
#

yes

#

now keep in mind these rational approximations can estimate 15√3 to be an integer

#

but you could also just try out various heights

#

the only think you need to look for is at the bottom, whether the outer triangle appears acceptable or not

#

if visually you cant tell the difference, you might as well just use any multiple of √3 and not need to resort to 15√3 only

#

here's the resulting triangles that appear

#

except for the base, Id say there is barely any error involved here

#

because h = 15 √3, that means h/(3√3) = 5

#

so h - 5√3 = 2/3 h

#

but since h ≈ 26, that also means 2/3 h ≈ 17

#

so you both get an exact rendition of 2/3 h and you also see that the error for h itself is extremely small

#

well 2/3 h ≈ 2/3 * 16 = 17 1/3 though, so the error isnt as good as it could be

#

but thats a lot of spots to look for error, let me see

tulip plover
#

okay I see

left gyro
#

now 15 √3 isnt the only number that works

tulip plover
left gyro
#

wdym

left gyro
#

we do that with 2/3 h instead of 1/2 h

tulip plover
#

okay so we are actually forming a triangle that is 2/3 the size of the bigger triangle

#

but we cut it at the top to get a triangle that is half the size

left gyro
#

we cut it at the bottom

#

you can see that the bottom, the lines continue towards the base of the bigger triangle

tulip plover
#

yes

left gyro
#

if you just not build those and draw a horizontal straight line where the base of the smaller triangle should be, that would be it

tulip plover
#

but the actual scale of that triangle is 2/3 the size of the bigger triangle

left gyro
#

the scale of the triangle is 1/2 the size of the bigger triangle

#

you dont seem to be remembering my words every well

tulip plover
#

you mean the purple one is half

left gyro
#

yes

tulip plover
#

I am talking about the triangle we made to form the purple one

left gyro
#

then dont use the word "actual"

#

its ambiguous

tulip plover
#

that is the actual triangle?

#

we cut it off

#

to make the smaller one

left gyro
#

actual can be either in the sense of "its real" or "its ideal"

#

"its real" is 2/3

#

"its ideal" is 1/2

tulip plover
#

hmm

left gyro
#

dont use the word

tulip plover
#

okay

left gyro
#

use practical, or empirical

tulip plover
#

how do you know where to cut off the bottom

#

oh I guess since the gaps are equal

#

the bottom gap would be the same as the side gaps

left gyro
#

@tulip plover back

#

anything else?

#

now that I think about, thats both parts of the question answered

#

the tetrahedron and the inner concentric equal gap triangle

tulip plover
#

30 sqrt 3

#

and 20 sqrt 3

left gyro
#

if you insist

#

oh right

tulip plover
left gyro
#

I need to give you a more convenient version

safe radishBOT
#

@tulip plover Has your question been resolved?

safe radishBOT
#

@tulip plover Has your question been resolved?

left gyro
#

renamed (w, h) to (x0, y0)

#

d controls the proportion of the inner blue triangle (0% to 100% size)

#

erase/place a comma here to choose whether to draw the triangle with equal gaps or not

#

it should be a lot easier to for example trial and error various equal gapped triangles just by moving the sliders around

#

you can move the point anywhere

#

if one of the directions is locked then replace y0 with a decimal number

tulip plover
#

I see

#

I have a question about this point here

#

so the base uses 0 only when x = .5

#

this seems irrelevant to the height of the triangle

#

no matter what value you plug into it will always have the same corner

#

and it looks different from the inner triangle

#

I think this is unavoidable due to the equal gaps of the sides

#

oh I see why the bigger triangle has those missing corners

#

nevermind

#

I thought the corners only appeared in odd integers

#

but it seems no value you plug into x sqrt 3 leads to that corner appearing

#

that's fine regardless

safe radishBOT
#

@tulip plover Has your question been resolved?

left gyro
#

@tulip plover what are you left to do rn

tulip plover
#

also is this the finished product basically?

left gyro
#

yes

#

the link answers the question

#

please pay closer attention for the answer was already told to you

tulip plover
#

hmm

left gyro
#

the best we can do is choose a smaller h by subtracting √3

#

this will ensure equal gaps

tulip plover
#

not that question

#

you answered that

tulip plover
left gyro
#

very specific circumstances so I wouldnt pay too close attention

#

as a reminder, the finished triangle wouldnt readily show you what the original red and blue triangles are

tulip plover
#

hmm but the inner triangle doesn't have the same looking corner of the big one

left gyro
#

oh thats no good

#

Im seeing that its good enough to slightly tweak d

#

it also helps to use the side of the triangle as a guide

#

if for example you want these corners

#

there needs to be a 2x1 block

left gyro
#

already its rather restrictive to have equal gaps in the first place

#

the d slider is about the most control you can have

tulip plover
tulip plover
left gyro
#

yep

#

and every time we - √3 we advance by a block

#

I think the d slider is the best way of going through them

#

it remains proportional if you increase/decrease y0

tulip plover
#

well it's fine as long as it's the most accurate my current big triangle already has a similar shape

left gyro
#

alr

#

oh theres a simple way I can actually fix a particular problem here

tulip plover
#

hmm

left gyro
#

desmos has a new feature where when I save, you see an updated copy

#

just refresh the page and you might see a minor difference here:

#

Ive changed the blocks on the bottommost row of the inner triangle so that the gaps remain the same there as well

#

keep in mind you could just not place the blocks there if you dont want to place them

tulip plover
#

yes

#

I think it is satisfactory I will try to figure out how to make the inner one into a tetrahedron and see

left gyro
#

try using the 3D link but with a non-integer height

#

the side length of the blue triangle is written as s1

#

you can see line 19 for that

#

or just type s1 on a separate line

#

you can change the slider to not snap to integers by tapping the bounds

#

nvm I just removed it, thats easier

tulip plover
#

so the previous line 19 is removed?

left gyro
#

oh my bad

left gyro
#

the inner triangle is the blue triangle in the 2D link

#

so line 19 is of the 2D link, you can find line 19 there or alternatively you can type s1 on a separate line to read it

tulip plover
#

and I plug that in here?

left gyro
#

yep, type it in

#

Ill need to check

#

but this s was originally intended to count the number of blocks (fencepost 1)

#

theres a good chance the tetrahedron you get wont have the same base as the triangle

#

currently the 3D version doesnt have a way around this, Ill need to rewrite it to be (x0, y0, z0) for that to be fixed

#

Im not intent on doing that rn

tulip plover
#

it seems to work fine with non integer heights

left gyro
#

but the base may not exactly align with the innter triangle in the other link

tulip plover
#

hmm

left gyro
#

also, there seems to be like a 2px gap on the bottom of your screen

#

I saw it a few times, idk whats up with that

tulip plover
#

I use hyprland

#

it's a linux thing

#

window tiling

left gyro
#

I see

left gyro
#

choose y and d so that s is close to an integer

#

and that the base of the blue triangle is close to a half-integer

#

that way it should be close enough to the assumptions the 3D link uses

tulip plover
#

yeah that's what I was expecting

left gyro
#

very unfortunate that youve had to do this

#

you can use this as sort of a reference

#

wait wrong one

#

this is essentially what s1 is

tulip plover
#

is there not a way to set a value for s in the 2d one that the other values would change to match it?

left gyro
#

not really

tulip plover
#

is ovee

left gyro
#

desmos isnt exactly built to do that

#

just choose some values for d and y0 to solve for your s

tulip plover
#

alright

left gyro
#

also, this is the y-coordinate of the base of the blue triangle

#

for this to be close to a half integer, that means (y0 - y1)/3 needs to be close to an integer

#

using this,

#

oh wait nvm thats slightly off, its not read like that

tulip plover
#

is it possible that you could make a diagram of the inner workings of these 2 desmos projects that describe how the lines work in the system and their effect on the triangle

left gyro
#

brb

tulip plover
#

is ovee

left gyro
#

@tulip plover updated the lines to have slightly simpler behavior, I dont remember the changes

left gyro
#

as I said before, you can just move the point above 28.75 to change it

tulip plover
#

I know

#

I was just curious why you made that change

left gyro
#

it doesnt mean anything

tulip plover
#

okay

left gyro
#

it just happened to have changed while I wasnt looking

tulip plover
#

it looks perfect I think?

#

is this supposed to be the case?

left gyro
#

hold on I thought I reverted that

#

let me see

#

oh right yes that intentional behavior

tulip plover
#

okay

left gyro
#

your y1 is set to line 6, not line 5

#

so the blocks arent fitting the blue triangle exactly

#

theyre fitting the closest blue triangle that would have equal gaps

tulip plover
#

I see

left gyro
#

the outer red triangle has a base that is 0.5 units above the x-axis and the top at (x0, y0)
its side length is s0 = (2 y0 + 1)/√3
line 24 shows the coordinates of the outer red triangle

0 < d < 1 controls what proportion the inner blue triangle is at
or that the inner blue triangle has side length s1 = d * s0
line 25 shows the coordinates of the inner blue triangle

note that the top coordinate is (x0, ((1 + 2d) y0 + 1 - d)/3)
set y1 to line 5 to have the inner blocks fit the inner blue triangle normally i.e. y1 = (1 + 2d) y0 + 1 - d)/3)
set y1 to line 6 to have the inner blocks instead fit the closest inner triangle that has equal gaps

#

I dont see anything off in this picture

tulip plover
#

no I'm just showing how it's the same triangle with a .03 difference

#

and it fits in

left gyro
#

oh alr

tulip plover
#

is this basically perfect for the tetrahedron?

left gyro
#

that looks pretty good

tulip plover
#

or actually I don't know anymore

#

okay so I changed d to .47 as I showed

#

and it makes the exactly same triangle as .5

tulip plover
#

this is the result for d = .5

#

it's a huge difference despite being the same triangle being formed in the middle

#

wouldn't there be a d that is the most accurate for s that makes this triangle since it is shown that multiple values can make the same thing

left gyro
#

thats not really necessary

tulip plover
#

hmm

left gyro
#

both s1 values are valid

tulip plover
#

but which is more accurate?

left gyro
#

theyre both accurate

tulip plover
#

how?

#

the triangle doesn't change at all

left gyro
#

remember youre using line 6 instead of line 5

#

line 6 as a reminder selects the closest blue triangle with equal gaps

left gyro
tulip plover
#

no the issue is the tetrahedron not the inner triangle

left gyro
#

change it to line 5 if you want to see the d values be different

left gyro
tulip plover
#

because we need to plug in the s that is generated from this graph to the 3d one

#

but these 2 exactly equal triangles are making 2 different values for s

left gyro
#

alr Ive added an extra line to state the side length of the triangle that the blocks are approximating

#

then again

#

oh I see a more reasonable way to go about doing this

tulip plover
#

same exact triangle formed but different s values

left gyro
#

hold on a second this is gonna be more polished

tulip plover
#

okay

left gyro
#

refresh your page, a temporary solution is already in place

tulip plover
#

I was looking at line 19

left gyro
#

I misread what you were talking about

tulip plover
#

so I did need to tell you again

left gyro
#

you didnt need to send an image after I already updated the link

tulip plover
#

ovee

#

you updated after?

tulip plover
#

ovee

#

though I don't see how this solves the most accurate value for s?

#

equal gaps brokers

left gyro
#

going to fix that too then

tulip plover
#

it's oee

left gyro
#

the method to place the base of a triangle is different than the sides

#

if you want it to line up, just dont place the blocks as stated earlier

tulip plover
#

okay

#

I was confused what you meant don't place the blocks

#

you just mean don't do the the corner parts

#

still that leaves the final issue of s value

left gyro
#

@tulip plover more polish now

#

nearest equal-gap triangle is now green

#

the original d s0 inner triangle without equal-gap guarantees is blue

#

also the controls have been updated to (X,Y) for the center

tulip plover
#

I see

#

does this mean the green one has a more accurate s value?

left gyro
#

s value that is accurate to?

tulip plover
#

for the tetrahedron?

left gyro
#

no

#

I cant really guarantee any of that

tulip plover
#

so there is no way to get the tetrahedron?

#

not even a manual way?

left gyro
#

ofc you can manually do it

#

also

tulip plover
#

yes I want the most accurate

left gyro
#

you know the difference between the blue and the green inner triangle?

tulip plover
#

yes

#

the green one goes solely for the equal gaps as you said

left gyro
#

there are two different s values for each

tulip plover
#

it has se

left gyro
#

yes, so you can just match it up with se

tulip plover
#

the issue is checking that the value of the s is accurate to the triangle

#

how do you check it or find the accurate s value

left gyro
#

as in accurate to the base of the tetrahedron?

tulip plover
#

do you not remember what I was saying about d=.47 and d=.5 making the exact same triangle but the value of s was 16 and 17

left gyro
#

and youre saying se doesnt fix this?

#

the purpose of se is to tell you the side length of the green triangle

tulip plover
#

I am asking you if you did it to fix that

left gyro
#

yes?

tulip plover
#

oh okay

left gyro
#

Im not sure exactly what you were asking

#

if you drag the centroid around,

#

you can see the green triangle is less sensitive

#

its as equally insensitive as the equal-gap blocks

#

you can think that its the triangle that those equal-gap blocks are approximating

tulip plover
#

yes I just tested it

#

the green triangle does solve the issue

left gyro
#

theres also having it be separate triangles

tulip plover
#

the s value only changes when the grid triangle changes

left gyro
#

blue and green

#

we are reaching previously unforetold levels of polish

tulip plover
#

2 different d values and same s value when they make the exact triangle

left gyro
#

very good

tulip plover
#

I think this is officially complete it should be able to form the tetrahedron if the s value is accurate

left gyro
#

if anything, the next order of business is to generalize the 3D link

tulip plover
#

hmm

left gyro
#

but I dont have the heart for that

tulip plover
#

is ovee

left gyro
#

lot of tedious work

tulip plover
#

I'd like to know the manual way to make the tetrahedron

#

I think that will yield the best results?

left gyro
#

we know the tetrahedron is generated from assuming the corner is at (0.5, 0.5, 0.5)

#

so it should be enough to make a triangle that has this lower-left corner

#

if you want exact results, youll need to solve for the necessary X, Y

#

I dont think its as bad as it looks

#

for one you can observe that the y-coordinate of the base of the green triangle seems locked into particular places

#

you wanted the inner triangular prism to be how wide?

tulip plover
#

around 25?

#

20-28

#

the size is relative to the bigger triangle

#

I think this would be the triangle I make

#

or this one

#

figuring out how to make the tetrahedron of the inner and outer triangles of these 2 is all I need

#

I just moved the x to 1

left gyro
#

Im finding (X, Y) = (0, 14.67) looks pretty good

#

the only conditions are that the the lower-left corner of each triangle is close to the center of the block

#

with that, you take the s0 and se values and then find the corresponding tetrahedra

#

as long as the values are exact enough (or you adjust Y slightly if its wrong) you should get the tetrahedra you want

#

I will point out that a generated tetrahedra may not exactly match the top half of a larger tetrahedra

#

hopefully you werent assuming thats the case, you know the back of the $1 bill does leave a slight gap between the tetrahedra

tulip plover
#

I have no idea about the dollar bill I just wanted tetrahedron

left gyro
tulip plover
#

oh

#

that's fine

#

I was kind of thinking of doing that

#

flattening the top

left gyro
#

well no other choice now than to try and do it

#

Ill see you in a bit

tulip plover
tulip plover
#

guess this counts as close to the center of the block

#

plugged the bigger triangle's s value and I got this

#

very hard to count these balls

#

plugged the smaller triangle in and got this

#

seems the balls converge with each other in the edges of the faces

#

I guess I can build this face and try to find the elevation of each ball?

#

the elevation is visually confusing

#

yeah this is why I wanted to manually do it this is too visually confusing for me to interpret how I am supposed to place the blocks

tulip plover
#

oh I just saw the z slider

tulip plover
#

this does not work

#

I got the value of the inner triangle but the first layer of the tetrahedron does not even match it

#

I think it's because the double tip it alters the slope a little

#

that's why I think a more manual way is needed for this

safe radishBOT
#

@tulip plover Has your question been resolved?

safe radishBOT
#

@tulip plover Has your question been resolved?

safe radishBOT
#

@tulip plover Has your question been resolved?

left gyro
#

I showed you the capital Z slider twice

tulip plover
#

well I figured it out but still didn't work

left gyro
# tulip plover

oh right, I forgot to update this to handle non-integer values

#

thats a relatively quick fix

tulip plover
#

and then it is completely finished

left gyro
#

you know if you bothered to actually read the lines, you could figure this out and not have to rely on me to do it all for you

tulip plover
#

this is foreign to me and that is why I was asking you to make a diagram explaining these lines and what they do to the triangle

left gyro
#

well thats not very possible

tulip plover
#

I just want to understand the math

#

as I said from the start

left gyro
#

youre asking me to understand it for you

#

also,

left gyro
tulip plover
#

no

left gyro
#

so a diagram wouldnt be possible

tulip plover
#

I am asking for just something that shows the math not the output

left gyro
#

the math is there on the left

tulip plover
#

like the workings of the math

left gyro
#

that is also there on the left

#

it is clearly makred

#

you will have to read it slowly to understand it

tulip plover
#

I want a very thorough explanation

left gyro
#

listen

#

you seem to think you know the best on how you want to learn

#

there are two issues that you have just glossed over while I was talking

tulip plover
#

I never even heard of floor or ceil before

left gyro
#

please stop interrupting

left gyro
tulip plover
#

you know on a whiteboard where a teacher draws on a marker labeling the math

#

and explaining it to you

#

schematics?

#

I want the math described

left gyro
#

for a variety of reasons, that is not possible here

#

let me explain what these reasons are

tulip plover
#

why?

left gyro
#

please stop interrupting

#

usually for simpler examples, you can read off the lines to see where each part is

#

however here, each line depends on either a set of variables with special meanings, or a particular way of looking at the triangle with special meanings

#

a blueprint or schematic does not show this information, it does not show the origin of a design, only its specifics

#

what you are looking at on the left is a schematic, and as you can see it is not immediately readable

#

therefore a schematic will not help

#

a diagram is a more simplified version of the schematic that just consists of a labeled version of the output

#

as you can imagine this allows less detail than a schematic and so will also not work

#

to understand the math, you have to understand the approach I used to write that math first, which I have already shown you twice

#

but I can show it again, it is not clear at first

#

do you understand?

tulip plover
#

yes

left gyro
#

second reason

left gyro
#

this is a hard pill to swallow, but you know best on what you dont know

#

there are times where this is not the case

#

for example, youre starting out on something new where you dont know what you dont know, so you can only at best explore a small portion by yourself

#

it is not the case here, I have already told you the basics of everything required for the 2D version let alone the 3D version

left gyro
#

now you are mentioning this like you dont remember, let me repeat what I said:

tulip plover
#

no I do remember

#

I meant before we speaking

left gyro
#

why refer to the past for a present problem?

tulip plover
#

because it relates to what I am asking for

#

I am trying to tell you

left gyro
#

hopefully youll say something that I dont know

tulip plover
#

I want just details on how you conceived this so I can understand your approach to this problem so I can learn myself how I can apply similar thinking to other things as from the start I had no real idea how I can tackle this problem and this math you used to form this has not been used by me and I want to know where it stems from and the details that helped you conceptualize a solution for this

left gyro
#

it was already explained in the 2D link

#

I dont think you understood what I said in the 2D link then

#

did you lie?

#

I will explain the 2D link again

#

this time, be honest when you dont understand something

tulip plover
#

I do understand but I am asking for like a piece of media that summarizes it all

left gyro
tulip plover
#

that's why I said diagram

left gyro
#

Im just one guy

tulip plover
#

I am just asking for like a summary 😭

left gyro
#

it doesnt fit in a summary

tulip plover
#

it's so ovee

left gyro
#

it fits in a 20-minute youtube video, but not a summary

#

you really think that, if it could so easily be explained in a summary, that I wouldnt have just told it to you by now?

#

this isnt going to fit in 2 sentences bro

#

lets just repeat what I said from before

#

this time youre partially familiar with the pieces

tulip plover
#

I was thinking of like a few pictures

left gyro
#

now maybe we can do a summary, but itll require some work from you

tulip plover
#

hmm

left gyro
#

not all math is visual

#

let me continue

#

heres a picture of the triangle, and please dont interrupt

#

now previously I explained how the dots were generated

#

the squares that is

#

now I want you to explain that back to me, so that I know how much you gathered from my previous explanations

#

with the math looking like this, it goes without saying that you need to know the approach before you can read the schematic

left gyro
#

what approach or general idea was I using?

#

you can be really broad here, all the specific details are dealt with later

tulip plover
#

continued fractions?

left gyro
#

thats not correct

#

try again

#

it involved something like a custom variant of the bresenham algorithm, didnt it
try mentioning something about that

#

you can also refresh your copy of the 2D link, there was a bug in the working of the math that I fixed

#

it should show properly now

#

lines 7 through 10 show part of the working

left gyro
tulip plover
#

okay the y0 is trying to find the center of the block and as it has values of .5, 1.5, 2.5 I think and so the floor (y) means x is approaching the lower limit which then 1/2 gets added and the sqrt 3 is the slope of the equilateral so it is basically getting a rough estimate of the slope using that as the denominator? and then we are checking the x placement which if left 0 you would have something that determines the placement on the negative side since it is x - y0-(floor(y) + 1/2)/sqrt3 and then the other side is the same just it has a ceiling on it to it that gets added 1 {0<y<ceil(y0)} that basically determines the symmetrical side

left gyro
#

youre taking the hard way around

tulip plover
#

that channel was hidden?

#

is ovee

left gyro
#

bro

#

thats our previous help channel

tulip plover
#

yeah I know

#

but it was hidden yesterday

#

I couldn't read the messages

#

it came back

left gyro
#

have you tried just searching for your own messages

#

I searched up proportional to find my post

tulip plover
#

it was completely gone from the channel list I looked for it

left gyro
#

from: @matt07734 proportional to be specific

#

doing that skips whether a channel is hidden or not

tulip plover
#

hmm

left gyro
tulip plover
#

I was under the impression that help channels get purged

left gyro
#

oh I see

#

well if you look around you can see that that's not the case

#

but while I was looking, I noticed this must be your first time on this server

tulip plover
#

also isn't the .5 and the 1.5 the thing I was saying?

#

we were looking for the center of the squares

#

to fill in the blocks

left gyro
#

thats only part of it

#

Im not sure if I showed you what the floor(x) + 1/2 exactly did, I mightve done that

tulip plover
#

we try to find the center that is closest to the slope of the triangle

left gyro
#

thats part of the schematic that rounds to the nearest integer + 1/2

left gyro
tulip plover
#

which is the slope of the triangle?

#

the line is the slope of the triangle?

left gyro
#

thats not how the word slope is used

#

the word slope means the rise/run of a given line, it is a number (√3), not a line

tulip plover
#

the triangle's side

#

yes

left gyro
#

thats the general purpose of the dots

tulip plover
#

I basically kind of said that from the schematics

left gyro
#

you tried to get into detail which has some issues in the way you attempted to explain it

tulip plover
#

hmm

left gyro
#

lets not do that until we piece this together

tulip plover
#

okay

left gyro
tulip plover
#

the issue is that when I wanted a summary I wanted this talk of clear up to be out of it

left gyro
#

this what?

#

talk of clear up?

#

wdym

tulip plover
#

like we try to clear things up

#

like right now

left gyro
#

well we already had that once

tulip plover
#

it bloats it

left gyro
#

thats when I explained it to you

#

well lets do it again

left gyro
#

limit is a special math word that means something else

#

use a different word like bound

tulip plover
#

yes but I was thinking they were the same

left gyro
#

they are not the same, anyways as I was saying

#

what we did here was place a block at each 0.5, 1.5, 2.5

#

then round it to the nearest block, using either floor(x) + 1/2 or ceil(x) - 1/2, both do the same

#

now theres something here I dont think you noticed

left gyro
#

the first was that each block was intended to be closer to the line than other options

#

rounding can achieve that

#

but the second is that the line has no gaps

#

the line here has a slope > 1

#

that means we go up more than we go right

#

so we need a block placed at every height, at least 1

tulip plover
left gyro
#

heres a slightly stronger example

#

you can see here the middle block has some pretty high error from the line

#

but it must be there as not to create a gap in the line

#

this one idea is what greatly simplifies what we are doing

#

it now means we know exactly where to look when we need to place blocks

#

same thing for the 3D example:

#

this face if best facing towards the yz axis

#

its not the same example as I showed you earlier with the xz axis but I think you should see a diagonal face for a change

#

here, we know there should be a block at every (y, z) coordinate

#

so that lets us, similar to the 2D case, choose the nearest block of the particular "row"

#

unfortunately the exact schematic involved differs between 2D and 3D, because 2D is really fast at shading while 3D is not

#

the 3D is in fact missing the block shading, it just shows you the dots

#

getting those dots in the right place is a technical detail, we can ignore that for now because I want you to understand the 2D schematic first

tulip plover
#

is it done like where it's like if there is a y difference that is greater than one from the center of the previous block to the next block then a block should be placed on top of the previous block to close the gap

left gyro
#

no, as stated earlier it isnt the bresenham algorithm

#

lets get into the details

#

we will focus on three lines: 6, 7, 8

#

line 7 is the line we want to approximate with blocks
line 8 are the actual dots placed to do so

#

now the top of the outer triangle is at (X, y0)

#

where X is the x-coordinate of the centroid
and y0 is calculated to be the top of the outer triangle (as 3Y - 1 if I remember)

#

so we first have to generate a list of y-coordinates

#

first one is for the bottom most point

#

last one, ceil(y0) - 1/2, is for the top most point

#

as you can see here, the points generated start at 1/2 and end around at y0

#

from that list of y-coordinates,

#

we plug it into the equation to get the x-coordinate

#

then we ceil(...) - 1/2 it to round it to the nearest block

#

this is written as a point, with the x- and y-coordinates like that

#

that way desmos displays it as a list of points

#

for example the 3rd entry in Y0 is 2.5

#

heres an example of "line 7" and "line 8" for 2.5

#

matching up with:

#

so you get a y-coordinate, find the x-coordinate using the line equation, then ceil(...) - 1/2 to round to the nearest integer + 1/2

#

the result is a point at that y-coordinate closer than any other

#

do this for each to get the entire set of points

left gyro
#

bresenham's algorithm builds it up from the bottom or from the top, point by point

#

this just does each one with a formula

#

a variant of drawing the line that in some ways isnt very bresenham at all

#

bresenham is intended to be quick and cheap, this is quick but not cheap with that √3 floating-point calculation

#

besides, I mentioned earlier that desmos doesnt do well with for loops
this is essentially the easiest desmos way to get these points
regardless I wouldve done this even if it wasnt desmos due to how simple it can be done

#

do you understand so far?

tulip plover
#

hmm I see

left gyro
#

with this cleared up, this is when we can summarize

tulip plover
#

I am getting a little confused with the lower case y0

left gyro
#

capital letters for lists and constants

#

lowercase letters for everything else

tulip plover
#

it's just 3y-1 yes

left gyro
#

y0 is calculated from Y to be the y-coordinate of the top of the triangle

#

the calculations shown are simplified, it is not immediately clear why it would just be 3Y - 1

#

you could view it as 3(Y - 1/2) + 1/2

#

and use that a centroid is at 1/3 height of a triangle

tulip plover
#

hmm alright

left gyro
#

so we have y0

#

then we get Y0, a list of points to draw the sides of the triangle

#

then we find where they are on the line

#

then we round them to the nearest block

#

exactly 1 point per y-coordinate, to leave no gaps

#

and we can use that because the line is more vertical than horizontal

tulip plover
left gyro
#

whoops, yes thats true

#

from here are some other steps, but this is where the 2D and 3D versions diverge

#

lets go over to that since that was your question

#

the math here is a bit more involved, some dot and cross product was used to get this to work right

#

oh hm

#

youre familiar with dot and cross product?

tulip plover
#

last thing I did was calculus

#

I don't know

left gyro
#

what about determinants?

tulip plover
#

I have not done that

left gyro
#

thats alright

#

heres how you can see it:

left gyro
#

in 3D, this would be a plane

#

now have you seen any ways to write down a plane? for example x + y + z = 1 or z = x + y?

tulip plover
#

so the plane must have y, x, z equal a single value?

left gyro
#

its just the (x, y, z) for which that equation is true

#

it looks like a plane, beacuse there are two directions you can go in that still keep you on the plane

#

for example if you had x + y + z = 1,

#

you can head in the (1, -1, 0) direction and still be on the same plane

#

so for example if you started at (0, 0, 1)

#

(1, -1, 1) is still on the plane

#

(2, -2, 1) is still on the plane

#

(x, -x, 1) is still on the plane for any real x

#

so (1, -1, 0) is seen here as a direction that keeps you on the plane

#

as opposed to most directions which do not do this, they leave the plane

#

a similar idea is also true for lines:

#

if you add (1, √3) to a point, it will remain on the line

#

the difference between a line and a plane is that a line has 1 direction, a plane has 2

#

any other direction would be some addition of the 1 or 2

tulip plover
#

oh I see

left gyro
#

you can see here its incredibly general and yet simple which way it goes

left gyro
#

because if you have the one direction (1, √3),

#

you can scale it by any amount and still be on the line

#

(2, 2√3)
(√3, 3)
(-1, -√3)
etc.

tulip plover
#

you are basically talking about that corner thing as the plane yes?

#

when you f3

#

or in modeling in blender

#

the red blue and green line

left gyro
#

the corner thing? as in the lower-left corner?

tulip plover
#

it has 3 different directions

#

for the x y and z axis

left gyro
#

the F3 crosshair?

tulip plover
#

yes

left gyro
#

I can confirm we are counting directions in that sense

#

3D for 3 directions

#

some amount of x + some amount of y + some amount of z

#

each direction an independent way to move a point somewhere

#

planes have 2 directions, lines have 1

#

for this reason, lines are 1 dimensional and planes are 2 dimensional

left gyro
#

any other direction that keeps you on the plane is a sum of multiples of these directions

#

its not easy at first to prove that this is the case, so I wont do it for now

#

probably wont show it to you at all, its not too necessary

left gyro
#

that and a starting point like (0, 0, 1) ig

tulip plover
#

yes

left gyro
#

very good

#

now the way I did this was suited for me, because I wanted a painless and quick way to get that plane

#

as a result, the math isnt readable, especially since youre not familiar with the dot or cross product

tulip plover
#

it's ovee

left gyro
#

however I can explain it roughly this way:

#

see these controls?

#

this was part of the process I was using to create the points

#

Im gonna have to fix this error then maybe itll be clearer for you

#

ok here we go

#

we know this plane faces most towards the yz axis

#

so we need to place exactly 1 block per y and z coordinate for this plane

#

the y3 and z3 sliders control this purple line which goes through the triangle

#

its coordinates allow for a variable called t

#

this t can vary between 1 and s
desmos graphs all of them
so you see a line that begins at (1, y3, z3) and ends at (s, y3, z3)

#

this line is parallel to the x-axis and pierces through the face

#

the question now is to determine this point, the point where the line intersects the plane

#

I find the coordinate of this point to be:

#

you can see the x-coordinate depends on the y- and z-

left gyro
#

once I have it, we are back in familiar territory

#

I dont know why I didnt do this earlier but Ive hidden the other faces

#

as before, we round the x-coordinate to the nearest block

#

floor(...) + 1/2

#

look closely and see that it is similar to the 2D version's line 8

#

final thing Id like to point out: desmos does not have such a thing as lists in lists

#

so you have to use a special command called for to plot a grid of points

tulip plover
#

hmm

left gyro
#

or at least to use a 2D grid of values

#

y3 being [.5, 1.5, ..., s]

#

and z3 also being [.5, 1.5, ..., s]

#

for will use this to give you:
(.5, .5), (1.5, .5), ..., (s, .5),
(.5, 1.5), ...

#

goes through the first coordinate, then goes through the second one

#

in the schematic this list is stored as F3
for instance, F3[16] would be the 16th point

#

you can see here the y and z coordinates are (15.5, .5)

left gyro
#

(.5, .5), (1.5, .5) ... (15.5, .5) ...
1st 2nd 16th

#

does this make sense?

tulip plover
#

the y part makes sense but I'm not seeing the z part

#

is the z working like this

#

where it turns to this side to make a another 2d like triangle going up?

left gyro
#

thats rather vague, I cant say if you got it or not

#

for this points for example,

tulip plover
#

I am saying is it doing the same thing we did to find the 2d triangle

#

just with y and z

#

like how in the video the guy used hull to make the 3d shapes in the mod

left gyro
#

this list of points acts the same as Y0 in being a set of coordinates to each place a block

tulip plover
#

he pulled the z axis up

left gyro
#

the first four points are these at the bottom

#

the bottom-right corner of this image is at (.5, .5, .5), that is the 1st point, F3[1]

#

so the bottom row is F3[4], F3[3], F3[2], F3[1], left-to-right, from this angle

tulip plover
#

visually confusing without a grid

left gyro
#

this should be clearer

tulip plover
#

I can see it but where is the middle of the block supposed to be the balls are at the center?

left gyro
#

theres a bit of a necker cube happening here

#

ok this angle should be good

#

we are currently looking at the inside of the face

#

you can see the y- and z- directions

#

at the bottom row, from left-to-right, are the points F3[1], F3[2], F3[3], and F3[4]

#

the y- and z- coordinates are (.5, .5), (1.5, .5), (2.5, .5), (3.5, .5)

tulip plover
#

so the preplotted dots like in the 2d one I just realized it's very small which is why this happens

left gyro
#

?

tulip plover
#

aren't these the dots that have to be connected like how you did the 2d one?

left gyro
#

oh I see

#

yes Im showing you a very small example to better understand F3's behavior

#

there are very few dots here

#

each dot still represents a block

tulip plover
#

yes

left gyro
#

also, theres a slight bug now that Im looking at this

#

[.5, 1.5, ... s] ends up being 5 points here due to desmos rounding s I think

#

or something like that not too sure

#

Ive fixed it as this

#

when s is 4, there are 4 points per row

#

ok as I was saying

#

F3 then has F3[5], F3[6], F3[7], F3[8] go like this

#

(.5, 1.5), (1.5, 1.5), (2.5, 1.5), (3.5, 1.5)

#

you can see here the for command is going through the grid of points one coordinate at a time

#

first it goes through every first coordinate

#

then it advances to the next second coordinate and goes through the first coordinates again

#

does this make sense?

tulip plover
#

this right

left gyro
#

you dont actually need the outer []s if youre viewing that all by itself

#

but thats the correct syntax

#

try doing (x, y, 1) for x = [1, 2, 3], y = [1, 2, 3]

#

put in L = before it to define L as this list

#

then do L[1], L[2], etc. to see how this list goes through every point

#

does the order make sense?

tulip plover
left gyro
#

the line automatically displays the stuff on the right side of the screen as you type stuff

#

you can just quickly go through the numbers 1 through 9 inside the []s on line 2

#

makes it easier to see the behavior

tulip plover
left gyro
#

Im going to pretend that was a video of you going through all 9 points

#

does this order make sense

tulip plover
#

I don't get it

#

after 3 it starts going into the green triangle

left gyro
#

instead of trying to look at it from afar and upside down

#

and type in L = (x, y, 1) for x = [1, 2, 3], y = [1, 2, 3]

tulip plover
#

oh I think I see it now

#

these are the preplotted points

#

like a grid

left gyro
#

ok that doesnt instill trust in me but sure

tulip plover
#

is ovee

left gyro
#

you can at least see the order that the for command goes through them

#

through this, yes I have the grid of points

#

so for here,

#

y3 and z3 are going through 0.5, 1.5, etc.

#

and the x-coordinate is calculated based on those

#

as a result, I get a grid of points, with a point for every (y3, z3)

tulip plover
#

I see

left gyro
#

this is a technical desmos detail to see the for and its order

#

but I think its important you can at least read off the coordinates of the points

left gyro
# left gyro so for here,

if you wanted to do this manually to find a block for the face, you can for example put in y3 = 4.5, z3 = 5.5

#

into this

tulip plover
#

is still no working is ovee

left gyro
#

Im not even done explaining

#

I dont even know what youre referring to

#

whats not working

tulip plover
#

you said you fixed it

#

earlier at the start

left gyro
#

unfortunately I didnt get around to doing that yet

tulip plover
left gyro
#

because we're going to do it together

tulip plover
#

oh okay

#

I thought was finished that is why you were explaining

left gyro
#

nah I was gonna try and get you to be able to understand this

tulip plover
#

I see

left gyro
#

unfortunately since you dont know dot or cross product,

tulip plover
#

it's so ovee

left gyro
#

the actual fix looks to be beyond your skill, so the best I can do here is walk you through how it works

#

then Ill just go fix the problem

tulip plover
#

too much skill issue I'm crying

left gyro
#

youll sort of see what the problem is actually

tulip plover
#

hmm

left gyro
#

here's face 4

tulip plover
#

it also needs to account for the double tip

left gyro
#

less of that

tulip plover
#

hmm

left gyro
#

merging into the other ones?

tulip plover
#

yes

left gyro
#

thats because I dont actually do a new calculation to get the face 4 points

tulip plover
#

I was curious about that

left gyro
#

I just uh

#

reflect the face 3 points

tulip plover
#

it's so ovee

left gyro
#

this only works if s is an integer

#

now I actually gotta do the face 4 points for real

left gyro
# left gyro

the .x, .y, .z get the respective coordinates out of F3

#

you can see all I do is do s - the x-coordinates then thats it

#

literal reflection

#

ok now that you know that, its time for the fix

tulip plover
#

so much win

left gyro
#

this might take a bit but maybe if I say enough words, you can understand it

#

I dont expect you to understand making face 4 though, sort of just watch the fireworks

tulip plover
#

I will never be a voxel tetrahedron designer

left gyro
#

you just havent learned vectors yet

#

its alr

#

go learn vectors later on then you can maybe return to this

#

theyre relatively simple, but its a bit much to just know for one singular use

tulip plover
#

what level of math is that?

left gyro
#

high school or college level

tulip plover
#

calculus bc?

left gyro
#

no

#

vectors arent calculus

#

theyre like 2D point math

tulip plover
#

physics

left gyro
#

but in 3D

#

physics will go over this, yes

tulip plover
#

I did physics c

left gyro
#

oh I see

#

those dont go over this

#

well thats a shame

tulip plover
#

is ovee

left gyro
#

ok as before, we already know we can do floor(...) + 1/2 or ceil(...) - 1/2

#

and that we need a block per y- and z- coordinate

#

the only missing step is getting that face

#

face 4 is currently being displayed by desmos as between these three points

#

V is storing where the four vertices are

#

V[2] is the lower-left one near the x-axis
V[3] is the lower-right one with a high y-coordinate
V[4] is the top one

#

same as before:

#

y4 goes from 0.5 to ceil(s) - 0.5

#

oh thats strange

tulip plover
#

hmm

left gyro
#

ok for now, Im changing the y4 and z4 upper bounds to be these

#

instead of ceil(s) - .5

#

Ill need to think more on whether I needed to do this or not, but for now thats what it ends on

#

ok anyway for a (y4, z4) I have a line going through the triangle

#

and i need to find the coordinates of the one point that goes through the triangle

#

ok heres something I think you might understand

#

we know the coordinates of V2, V3, and V4

#

so lets consider two directions,

#

one from V[2] to V[3]

#

another from V[2] to V[4]

#

each direction is by definition the edge of this triangle

#

so theyre along the plane

#

now the dot cross whatever allows us to tell if a particular point is on a plane or not

#

we simply find the one point which would be on the plane

tulip plover
#

hmm so you do that all over the plane to make the blocks?

left gyro
#

yes

tulip plover
#

so truee

left gyro
#

after I find the point,

tulip plover
#

is ovee

left gyro
#

lol

#

hold on I need to actually find the point first before I say what happens after

#

we can first use something called the cross product

#

this takes in 2 vectors, and outputs a vector that is perpendicular to the both of them

#

for example, (1, 0, 0) cross (0, 1, 0) is (0, 0, 1)

#

unfortunately its a bit inconvenient that the vector goes out of frame

#

but this would be how itd look

#

what do I use this vector for? I can use a dot product

#

the dot product takes in two vectors and can tell you whether those vectors are perpendicular or not

#

perpendicular vectors always have a dot product of 0

#

blue dot green here is always 0 for either of the blue vectors

tulip plover
#

hmm

left gyro
#

now think about if we had a point on the purple line that was also on the triangle