#help-23
1 messages · Page 350 of 1
24/3 = 8 not 6
oh my god.
@glacial pine Has your question been resolved?
Closed by @glacial pine
Use .reopen if this was a mistake.
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.
.@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)
the issue is how do I figure out how much do I have to position it vertically
the smaller triangle should always have equal gaps from the bigger one as long as it's in the middle?
thats not true
so then I need to figure
oh btw did you sleep
great, because youre asking questions we already answered
tell me again, what do we do do h to move this 1 unit to the right?
decrease it
ok lets be more specific on this
by sqrt 3
that is not at all a helpful answer
there you go
moving it in general to the right requires that you decrease h
yes and if we do that 14 times
it will move 14 blocks inward
but you said that doesn't make the gaps equal
I didnt say that
I asked that?
you did 24 instead of 48 - 14√3
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
that's why I was assuming that it is in the center when asking
oh that's how we can do this
there's a way we can go and do this
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
the same thing I've been saying?
that is not what I was asking about
if you dont know the number of times
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
I am talking in a general sense
so then tell for this tool specifically
you made this statement which is not true for all subtractions
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
as for the other "no", I made a mistake
for every √3 h is decreased by from the bigger triangle the smaller triangle will always have equal gaps with the bigger triangle
I thought 48 - 14√3 was correct, but its not
it would have equal gaps but it wouldnt be of the correct size
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
so a bigger triangle that starts at the base of the bigger triangle?
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
knowing the smaller triangle is 2/3 h, we approximate h - n√3 ≈ 2/3 h
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?
are you going to scale them down?
that way the n here is exact
and if we pick the correct multiple, we can see that h is not far off from an integer height
so it looks alright
I see
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
I dont know the proof, but these continued fraction ones are the best you can get
so trial and error is unavoidable?
if you want to avoid trial and error, use a continued fraction
this says √3 ≈ 26/15
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
isn't it just multiplying the numerator and denominator with the same value?
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
I see
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
yes I see
so this is definitely a sequence that converges to √3, and (unprovenly) also gives the best rational approximations at each step
so x approaching sqrt 3?
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
okay I see
now 15 √3 isnt the only number that works
so if you want half the triangle you would do 1/2h which is 13
wdym
this is doing half the triangle
we do that with 2/3 h instead of 1/2 h
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
we cut it at the bottom
you can see that the bottom, the lines continue towards the base of the bigger triangle
yes
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
but the actual scale of that triangle is 2/3 the size of the bigger triangle
the scale of the triangle is 1/2 the size of the bigger triangle
you dont seem to be remembering my words every well
you mean the purple one is half
yes
I am talking about the triangle we made to form the purple one
actual can be either in the sense of "its real" or "its ideal"
"its real" is 2/3
"its ideal" is 1/2
hmm
dont use the word
okay
use practical, or empirical
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
@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
I need to give you a more convenient version
@tulip plover Has your question been resolved?
@tulip plover Has your question been resolved?
@tulip plover polished version https://www.desmos.com/calculator/razdkebern
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
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
@tulip plover Has your question been resolved?
@tulip plover what are you left to do rn
I was asking the question
also is this the finished product basically?
yes
the link answers the question
please pay closer attention for the answer was already told to you
hmm
we cant position it vertically
the best we can do is choose a smaller h by subtracting √3
this will ensure equal gaps
this one
oh right this
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
hmm but the inner triangle doesn't have the same looking corner of the big one
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
unfortunately I dont have a better answer than that
already its rather restrictive to have equal gaps in the first place
the d slider is about the most control you can have
it is because of the 1 block length sides
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
well it's fine as long as it's the most accurate my current big triangle already has a similar shape
hmm
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
yes
I think it is satisfactory I will try to figure out how to make the inner one into a tetrahedron and see
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
so the previous line 19 is removed?
oh my bad
this blue triangle is in the 2D link
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
and I plug that in here?
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
it seems to work fine with non integer heights
but the base may not exactly align with the innter triangle in the other link
hmm
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
I see
the best option I have for you about having this line up isnt very neat
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
yeah that's what I was expecting
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
is there not a way to set a value for s in the 2d one that the other values would change to match it?
not really
is ovee
desmos isnt exactly built to do that
just choose some values for d and y0 to solve for your s
alright
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
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
brb
is ovee
@tulip plover updated the lines to have slightly simpler behavior, I dont remember the changes
hmm
y is max 28.75 now?
as I said before, you can just move the point above 28.75 to change it
it doesnt mean anything
okay
it just happened to have changed while I wasnt looking
okay
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
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
no I'm just showing how it's the same triangle with a .03 difference
and it fits in
oh alr
is this basically perfect for the tetrahedron?
that looks pretty good
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
that is the result for d = .47
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
thats not really necessary
hmm
both s1 values are valid
but which is more accurate?
theyre both accurate
remember youre using line 6 instead of line 5
line 6 as a reminder selects the closest blue triangle with equal gaps
theyre both accurate in that you cant choose a better equal gapped inner triangle than those
no the issue is the tetrahedron not the inner triangle
change it to line 5 if you want to see the d values be different
Im going to be honest, the solution is rather bleak
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
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
same exact triangle formed but different s values
hold on a second this is gonna be more polished
okay
you already told me the same thing three times
refresh your page, a temporary solution is already in place
then why talk about line 5?
I was looking at line 19
I misread what you were talking about
so I did need to tell you again
you didnt need to send an image after I already updated the link
...here
ovee
though I don't see how this solves the most accurate value for s?
huh?
equal gaps brokers
it's oee
on second thought I have decided not to fix this
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
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
@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
s value that is accurate to?
for the tetrahedron?
yes I want the most accurate
you know the difference between the blue and the green inner triangle?
there are two different s values for each
it has se
yes, so you can just match it up with se
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
as in accurate to the base of the tetrahedron?
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
and youre saying se doesnt fix this?
the purpose of se is to tell you the side length of the green triangle
I am asking you if you did it to fix that
yes?
oh okay
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
theres also having it be separate triangles
the s value only changes when the grid triangle changes
2 different d values and same s value when they make the exact triangle
very good
I think this is officially complete it should be able to form the tetrahedron if the s value is accurate
if anything, the next order of business is to generalize the 3D link
hmm
but I dont have the heart for that
is ovee
lot of tedious work
I'd like to know the manual way to make the tetrahedron
I think that will yield the best results?
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?
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
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
I have no idea about the dollar bill I just wanted tetrahedron
Im talking about hiding this mismatch with a gap between the larger and smaller tetrahedra
I was saying that I didn't want to generate it and wanted to make it manually 😭
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
oh I just saw the z slider
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
@tulip plover Has your question been resolved?
@tulip plover Has your question been resolved?
@tulip plover Has your question been resolved?
you have to listen to what Im saying next time
I showed you the capital Z slider twice
well I figured it out but still didn't work
oh right, I forgot to update this to handle non-integer values
thats a relatively quick fix
and then it is completely finished
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
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
oh you mean each line in the desmos, not the drawn lines in the 2D link
well thats not very possible
its not possible for each line in the code to have a distinct visual representation in the output
no
so a diagram wouldnt be possible
I am asking for just something that shows the math not the output
the math is there on the left
like the workings of the math
that is also there on the left
it is clearly makred
you will have to read it slowly to understand it
I want a very thorough explanation
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
lets start with the first issue
I never even heard of floor or ceil before
please stop interrupting
elaborate on what a diagram is for me
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
for a variety of reasons, that is not possible here
let me explain what these reasons are
why?
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?
yes
second reason
to explain something, the best way to explain something is to do it yourself
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
that includes what floor and ceiling are, I showed them to you and you said you understood
now you are mentioning this like you dont remember, let me repeat what I said:
why refer to the past for a present problem?
hopefully youll say something that I dont know
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
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
I do understand but I am asking for like a piece of media that summarizes it all
not everything is made out of 20-minute youtube videos buddy
that's why I said diagram
Im just one guy
I am just asking for like a summary 😭
it doesnt fit in a summary
it's so ovee
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
I was thinking of like a few pictures
now maybe we can do a summary, but itll require some work from you
hmm
there is exactly one picture, and its the one Im showing you
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
so tell me, how did I place these blocks?
what approach or general idea was I using?
you can be really broad here, all the specific details are dealt with later
continued fractions?
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
parts of it are still convoluted as a result of getting it to work in desmos, so just general ideas are OK here
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
again its not recommended to attempt to read the purpose of the math from its schematic
youre taking the hard way around
you could also just look back on what we said earlier: #help-15 message
yeah I know
but it was hidden yesterday
I couldn't read the messages
it came back
have you tried just searching for your own messages
I searched up proportional to find my post
it was completely gone from the channel list I looked for it
from: @matt07734 proportional to be specific
doing that skips whether a channel is hidden or not
hmm
you might as well be saying you couldnt find a website because it was on the 2nd page of google
I was under the impression that help channels get purged
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
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
thats only part of it
Im not sure if I showed you what the floor(x) + 1/2 exactly did, I mightve done that
we try to find the center that is closest to the slope of the triangle
thats part of the schematic that rounds to the nearest integer + 1/2
closest to the line you mean
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
yes there we go
thats the general purpose of the dots
I basically kind of said that from the schematics
you tried to get into detail which has some issues in the way you attempted to explain it
hmm
lets not do that until we piece this together
okay
first, "approaching" is reserved for infinite processes like limits, try not to use it
the issue is that when I wanted a summary I wanted this talk of clear up to be out of it
well we already had that once
it bloats it
I thought floor was limits?
limit is a special math word that means something else
use a different word like bound
yes but I was thinking they were the same
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
we wanted 2 things for our block placement
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
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
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
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
distinctly notice here that, unlike the bresenham line, each coordinate is known in advance
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?
hmm I see
with this cleared up, this is when we can summarize
I am getting a little confused with the lower case y0
it's just 3y-1 yes
yes the letter conventions got shifted around when I polished it
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
hmm alright
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
per side yes
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?
what about determinants?
I have not done that
we need a version of line 7, which would be the face itself that we are trying to approximating
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?
so the plane must have y, x, z equal a single value?
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
oh I see
you can see here its incredibly general and yet simple which way it goes
"1 direction" for a 2-directional line
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.
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
the corner thing? as in the lower-left corner?
the F3 crosshair?
yes
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
two directions you can pick here are (1, -1, 0) and (1, 0, -1)
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
but you do get the idea that these 2 directions would be all you need for this plane, right?
that and a starting point like (0, 0, 1) ig
yes
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
it's ovee
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-
the dot cross determinant stuff was just to find this point
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
hmm
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)
lines up with the list here
(.5, .5), (1.5, .5) ... (15.5, .5) ...
1st 2nd 16th
does this make sense?
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?
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
this list of points acts the same as Y0 in being a set of coordinates to each place a block
he pulled the z axis up
ok for these points for example,
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
visually confusing without a grid
I can see it but where is the middle of the block supposed to be the balls are at the center?
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)
so the preplotted dots like in the 2d one I just realized it's very small which is why this happens
?
aren't these the dots that have to be connected like how you did the 2d one?
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
yes
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?
this right
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?
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
Im going to pretend that was a video of you going through all 9 points
does this order make sense
I think you should open a new desmos.com/3d tab
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]
ok that doesnt instill trust in me but sure
is ovee
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)
I see
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
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
is still no working is ovee
Im not even done explaining
I dont even know what youre referring to
whats not working
unfortunately I didnt get around to doing that yet
this
because we're going to do it together
nah I was gonna try and get you to be able to understand this
I see
unfortunately since you dont know dot or cross product,
it's so ovee
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
too much skill issue I'm crying
hmm
here's face 4
it also needs to account for the double tip
less of that
hmm
you notice here how the blue points are uh
merging into the other ones?
yes
thats because I dont actually do a new calculation to get the face 4 points
I was curious about that
it's so ovee
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
so much win
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
I will never be a voxel tetrahedron designer
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
what level of math is that?
high school or college level
calculus bc?
physics
I did physics c
is ovee
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
hmm
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
hmm so you do that all over the plane to make the blocks?
yes
so truee
after I find the point,
is ovee
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
hmm
now think about if we had a point on the purple line that was also on the triangle