How to rotate any graph by any angle (Part 3)

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • Part 3

Комментарии • 168

  • @pseudonym8762
    @pseudonym8762 Год назад +176

    WOOOOOOO PART 3 LETS GOOOOO

  • @samylahlou
    @samylahlou Год назад +97

    Instead of rotating the curve, you can make the POV change during time. Parametrize the path of the POV, deduce the equation of the plane onto which the projection will be done in terms of the coordinate of the POV and make a change of basis to get rid of the z coordinate. Sounds more difficult but is actually not that hard.

    • @slayvict
      @slayvict Год назад

      I'm not sure, but I think moving pov away from the Z axis requires a lot more work. You need to use a perspective projection matrix, think about FOV. The camera is a vector and the direction the position looks is backwards, and a lot more complicated stuff. When I tried to code this using c# I messed up on so many levels that I gave up, I had a deadline for the project so I used an external library. I will definitely write proper poor 3d library only for sake of my linear algebra knowledge

    • @samylahlou
      @samylahlou Год назад +1

      @@slayvict I don’t really know what a perspective projection Matrix is but if you have a POV that always look at the center of the 3D space, you can deduce the equation of the plane you project onto, the equation of the projection of the original 3D curve, the change of basis matrix only with the coordinate of the POV. Which means that if you parametrize the POV, you can actually do exactly as much as with a fixed point. I did this a few weeks ago and it worked perfectly.

    • @didodido883
      @didodido883 Год назад +1

      ​​@@samylahlou Perspective projection matrix is simply division by z axis raised to some power like 0.4 to both x axis and y axis. it took me too long to realise this simple fact in making 4-cube.

    • @LexachGaming
      @LexachGaming Месяц назад

      to mani leters

  • @leleep_
    @leleep_ Год назад +92

    This is just like drawing a cube on a paper. We stretch one face of square linearly along the plane to make it a cube. This concept is interesting

  • @kappascopezz5122
    @kappascopezz5122 Год назад +42

    To avoid the formulas becoming too unwieldy, I like to use shadertoy instead of desmos. Though that doesn't do as well with parametric equations

  • @mr.biscuits2160
    @mr.biscuits2160 Год назад +24

    NO WAY I WAS JUST DONE WATCHING PART 2. THIS MATERIAL IS PURELY BONKERS. Let's goooooo bean dude

  • @Mr.Carrot
    @Mr.Carrot Год назад +21

    This is why math is beautiful

  • @lMINERl
    @lMINERl Год назад +30

    Okay that was beautiful 3 part series you easily earned the sub

  • @Hummus_Yummus
    @Hummus_Yummus Год назад +10

    I saw the first two videos a few days ago and now I'm a desmos wizard.

  • @Jaun_
    @Jaun_ Год назад +12

    This is answering a lot of long time questions I just never bothered to go look for - but so glad I found

  • @DadicekCz
    @DadicekCz Год назад +12

    I love this series! And i love that it actually gives an insight into the concept of how 3D images on computers work!

  • @flugunfal
    @flugunfal Год назад +18

    Your videos are amazing! Thank you for making them.

  • @suddeneevee9441
    @suddeneevee9441 Год назад +6

    "Spiral vortex"
    So just an ordinairy spiral, but the radius is exponential?
    That ought to be an interesting projection :)

  • @erazemburger1153
    @erazemburger1153 Год назад +8

    God I love your content

  • @afzal_amanullah
    @afzal_amanullah Год назад +3

    1 step closer to creating doom in desmos.

  • @teamruddy611
    @teamruddy611 Год назад +1

    As one of the few people who actaully drew 3D stuff in desmos this is easy.

  • @shashankjrao4148
    @shashankjrao4148 Год назад +8

    Damn the subs be growing at 2k a day
    You deserve even more

  • @lawrencechan6368
    @lawrencechan6368 Год назад +4

    my favourite series :)

  • @moppermop5287
    @moppermop5287 9 месяцев назад

    The fact that Desmos now has a 3d version makes this video very useful.

  • @agargamer6759
    @agargamer6759 Год назад +13

    Wow, that is a monster of an equation!

  • @teddyzhou2074
    @teddyzhou2074 Год назад +5

    Great video❤, could you make a video about how to mirror any graph over any point or any line?

  • @michakochanski9240
    @michakochanski9240 Год назад +4

    daily portion of desmos madness :D

  • @jixpuzzle
    @jixpuzzle Год назад +3

    Bro! Your channel is an absolute goldmine of youtube! Golden Content!!! Keep it up man:)

  • @WhyneedanAlias
    @WhyneedanAlias Год назад +7

    Love it, before this video came out I decided to play around with 3D rotations because of the tease at the end of last video. I got it working using a rotation matrix and the formulae erre actually much simpler than yours, although I cannot as easily change the rotation axis. I'd probably have to rotate twice.
    Anyways earlier today I made an interactive program in desmos where you can move on the z axis to and from a unit sphere around the origin. You can change certain parameters like opacheness and auto rotation. Maybe I'll post it somewhere when I'm finished because I'm honestly a bit pround about it ^^'
    About the 4D case I think it would be quite similar if youuse the same formula to project it first from R⁴ to R³ and then to R². Maybe something like 30/30-w*[x,y,z,0] (w is the 4th coord) again and from there you have it in 3D again. Maybe I'll play around eith it tommorrow xD

    • @WhyneedanAlias
      @WhyneedanAlias Год назад +1

      Update: So I tried the 4D thing and in theory it seems to work. I've succesfully created a grid of the "surface" of a hypersphere. But I am not happy with my projection algorithm 1/((d-z)*(d-w))*(x,y). It is simply the one for 3D applied twice and because of that it treats the z and w axis equal which I do not like. Moving 1 across the z axis looks the same as moving 1 across the w axis.
      Maybe I'll find a better formula
      Update: I made a Hypercube and I got it spinning and I actually got an animation similar to the one we all know where it turns inside out.
      I prijected it from 4d to 3d by first creating a point like a lightsource and then calculated it's 3d shadow on the x,y,z space. The difference to before was to make that point independent from the observer

    • @didodido883
      @didodido883 Год назад

      ​@@WhyneedanAlias steal the code from here.
      ruclips.net/video/4URVJ3D8e8k/видео.html

    • @didodido883
      @didodido883 Год назад

      or i think source code is not being provided in that video.

    • @WhyneedanAlias
      @WhyneedanAlias Год назад

      @@didodido883 It was still an interesting watch, so thank you.
      I think my formula actually works relatively fine. It would be p(x,y,z,w)=d2/(d2-w) * [x,y,z] to have it in 3D and then you can just use the method from the video to get in to 2D. At this step you can use the 2D rotation stuff from video one to rotate it around any plane like the x-w plane to get some cool effects.
      Edit: maybe I should add that d2 is just a constant referring to the 4D point from which to project to the x-y-z hyperplane. It has the coordinates (0,0,0,d2)

    • @parkergough9940
      @parkergough9940 Год назад

      Sense you proj from 4 space, can you proj double rotation to 2 space with your formula?

  • @Javie3
    @Javie3 Год назад +3

    Weeeee, spining graphs!!

  • @Longseax
    @Longseax Год назад +1

    even with b1 i can understand you, such a good job!

  • @mug6377
    @mug6377 Год назад +2

    my brain exploded watching this video

  • @guigazalu
    @guigazalu Год назад +1

    4D: maybe, there's a map editor for 4D miner, and you could use something like marching [hyper-]cubes to determine which blocks would make part of the mesh.

  • @draido-dev
    @draido-dev Год назад +4

    im waiting for part 4

  • @Witch_of_Pandemonium
    @Witch_of_Pandemonium Год назад +3

    Nice it's finally here

  • @mohammadal-rafati9555
    @mohammadal-rafati9555 Год назад +2

    Liked before watching

  • @worldbfr3e263
    @worldbfr3e263 Год назад +7

    At 20:00, would it be possible to have it spinning like it is now and simultaneously rotating along the line through itself like it was just before?

    • @javedansari-nb2pk
      @javedansari-nb2pk Год назад +1

      Yes but you will have to use the rotating equation multiple times

    • @jimi02468
      @jimi02468 Год назад

      Why not? From the last video I got the idea that you could have a graph rotating round a point which is already rotating around another point and even that would be rotating around a third point. All at the same time. Or whatever craziness.

  • @Siwdvi
    @Siwdvi Год назад +4

    That man has a brain bigger than my mom

  • @Shayos
    @Shayos Год назад +1

    You are honestly just incredible

  • @javedansari-nb2pk
    @javedansari-nb2pk Год назад +4

    18:08 I tried in a different axis of rotation but forgot to normalise and crashed Desmos

  • @reecec626
    @reecec626 Год назад +1

    I love watching the number of subscribers grow!

  • @fano72
    @fano72 3 месяца назад

    You explained to Principe of Ray Tracing by the way!

  • @jujeep3204
    @jujeep3204 Год назад +1

    Thank you a lot of knowledge, could you make a lot of math like this, I love you.

  • @opiret44
    @opiret44 Год назад +1

    "We're gonna go for the general case" after setting the viewing point (0,0,30) rather than generalizing it.

  • @fckyu5440
    @fckyu5440 Год назад +1

    Keep up the good work, Beanie!

  • @localidiot4078
    @localidiot4078 Год назад +2

    I wonder if this could be simplified with vector multiplication instead of sin and cos.

    • @angeldude101
      @angeldude101 Год назад +1

      Traditional linear algebra doesn't have vector multiplication beyond the dot and cross products, though those do respectively correspond to the cosine and sine functions. A true vector product, like the one from geometric algebra, would be akin to replacing cosine and sine with an exponential. In fact, in geometric algebra, rotating a vector v around an axis a by angle θ is done by exp(θa/2)*v*exp(-θa/2). (Why the /2? Because the coefficient is more related to the area of the circular sector than the arc length around it. Alternatively, it's quantum. Either way, quaternions work the exact same way.)

    • @localidiot4078
      @localidiot4078 Год назад +1

      @@angeldude101 no shit! That's crazy. I just started learning about dot and cross products. The rabbit hole just keeps getting deeper

  • @wyboo2019
    @wyboo2019 Год назад

    even easier easy way: rotate in geometric algebra, then the rotated function is just exp(-theta/2 B) v exp(theta/2 B) where B is a unit bivector representing the plane that the rotation is occurring in

  • @TupperWallace
    @TupperWallace Год назад +1

    Good job, and amusing persona

  • @Craxulator
    @Craxulator Год назад +3

    Could you link the working Desmos graph in the description, I can't figure out what's wrong with mine and the working one would help me find my problem.

    • @tfg601
      @tfg601 Год назад +1

      it doesn't work for me :(

    • @zaptrap4802
      @zaptrap4802 Год назад +2

      yes this would be so cool! I hope they get around to adding the link to the description.

    • @QP9237
      @QP9237 7 месяцев назад

      Can we share links on youtube? I’ve tried before and it hasn’t let me before… I wouldn’t mind sharing a fully functional parametric 3D grapher I made on desmos.

    • @Craxulator
      @Craxulator 7 месяцев назад

      @@QP9237 Yes you can! Just copy and paste the link...

    • @QP9237
      @QP9237 7 месяцев назад

      @@CraxulatorSo I just pasted the share link and posted the comment, but it doesn’t display as a comment when I reload the comments, so let me know if you can actually see the link.

  • @vicr123
    @vicr123 Год назад +1

    Your videos remind me a lot of a guy I used to watch called Sen Zen

  • @hifty7779
    @hifty7779 Год назад +2

    Woooooot!

  • @MrGnome-ng6jv
    @MrGnome-ng6jv Год назад +1

    you are an artist

  • @kenhaley4
    @kenhaley4 Год назад +1

    When I try to copy these equations into Desmos, I'm getting very choppy animation, instead of the nice smooth animation in the video. My computer's CPU is an Intel Core i7-6700, which isn't blazing, but seems fine for most things. Is that the problem, or am I doing something wrong?

  • @yaghogrossi7947
    @yaghogrossi7947 Год назад

    Bro, your vids are amazing. BONS PRA KRL. Keep on the awesome work!

  • @Qreator06
    @Qreator06 Год назад +2

    You just had to upload while I was recording, now I had to restart :(

  • @kono152
    @kono152 Год назад

    you should make a series on transforming an axis into any curve, i did it for a parabola and it gave some pretty interesting results

  • @niom9446
    @niom9446 5 месяцев назад

    insane big pog content

  • @JLeoRV
    @JLeoRV Год назад +1

    Beautiful.

  • @ilyashick
    @ilyashick Год назад +2

    gg my man jumped to 6k subs from 1.5k in 2 days

    • @tfg601
      @tfg601 Год назад +1

      yeah everyone only subs to him for his content, not for anything else. They probably wanted to see this so they could copy him and brag about it.

  • @paulbloemen7256
    @paulbloemen7256 Год назад

    An idea to spend a video on geometric algebra? It seems to do miracles on computer graphics.

  • @CorbeusUltra
    @CorbeusUltra Год назад

    It would be nice to have a complete desmos tutorial, i dont even know how to do parametrics equations

  • @nirki
    @nirki Год назад

    This is beautiful.

  • @CreativeEQW
    @CreativeEQW Год назад

    Matbatwings did method two in minecraft with redstone, such a cool creation

  • @lemonade1316
    @lemonade1316 Год назад +2

    Ur awesome :)

  • @Aditya_196
    @Aditya_196 8 месяцев назад +1

    😢 y did blud stopped making videos

  • @elhoplita69
    @elhoplita69 Год назад +1

    This is gold!!

  • @user-kq3xn3jp7m
    @user-kq3xn3jp7m Год назад +1

    this is gonna be fun

  • @wilsonoliveira7447
    @wilsonoliveira7447 6 месяцев назад

    It's very hard to follow. Anyway, you are very clever. It was a MBA cause?

  • @PacoCotero1221
    @PacoCotero1221 Год назад +1

    🔥🔥🔥🔥🔥🗣️🗣️🗣️🗣️❗❗❗❗💯💯💯💯 Gatech quality

  • @HighKingTurgon
    @HighKingTurgon Год назад

    Can't wait for Part 4

  • @inverse_of_zero
    @inverse_of_zero Год назад +1

    i see the mysterious youtube algorithm has caught you ;)

  • @tom-on
    @tom-on 11 месяцев назад

    bro is cracked at desmos

  • @ArchDudeify
    @ArchDudeify Год назад +2

    More please 🙇‍♂️

  • @theunknown4834
    @theunknown4834 Год назад +1

    You might wanna stand a bit away from the mic when you breath oops

  • @kelvin-6710
    @kelvin-6710 Год назад

    Very educational.

  • @NukDokPlex
    @NukDokPlex 10 месяцев назад

    RUclips recomendations in 6am be like

  • @Scrumtrulescent
    @Scrumtrulescent Год назад +1

    Amazing!!!

  • @weirdredstone42
    @weirdredstone42 Год назад +2

    this is real cool

  • @positivenozy6065
    @positivenozy6065 Год назад

    jesse from breaking bad explaining maths (meths) yo

  • @lokwu9147
    @lokwu9147 Год назад +1

    PART 3 LETS GOO

  • @masscreationbroadcasts
    @masscreationbroadcasts 11 месяцев назад

    1:50 Can you Pull it, Twist it, Bop it?

  • @ghostagent3552
    @ghostagent3552 Год назад +3

    How did you make this tho? I haven't done much outside of the regular desmos calculator

  • @arkdotgif
    @arkdotgif Год назад

    18:18 he sounds so fed up 💀

  • @pr0hobo
    @pr0hobo Год назад +1

    what if you wanted the rotation axis to rotate around a different axis

  • @Aerobrake
    @Aerobrake Год назад +1

    YEEEEES

  • @brendandelear1145
    @brendandelear1145 Год назад +1

    Woo hooo thank you!!!!

  • @vladyslavkryvoruchko
    @vladyslavkryvoruchko Год назад

    Thanks to this mindblowing video I managed to make a square graph without infinite exponents.
    Here it is btw:
    |x-y|+|x+y|=1

  • @zaptrap4802
    @zaptrap4802 Год назад

    I'm assuming projection of 4D graphs would require the projection algorithm twice, right? The first projection would project the 4D graph onto a 3D surface, and the second projection would just be the same as shown in the video, to project the 3D projection onto a 2D surface. Sure, the first projection would be more complicated, and the entire graph function would look like a nightmare, but I guess that's doable?
    I'm not sure if Rodrigues' Rotation Formula works though, I still don't understand rotations in 4D...
    I haven't really thought about all this much, so what I just said may or may not be wrong, so if there's any smarter people here in the comments, it would be nice to share your insight.

  • @redon638
    @redon638 Год назад +2

    4th

  • @Dr.1.
    @Dr.1. Год назад +1

    yoooooooooo this was soo cool

  • @HadarSHA256
    @HadarSHA256 Год назад +1

    you should work for desmos

  • @Dr.1.
    @Dr.1. Год назад

    you are awesome

  • @crazytiger6
    @crazytiger6 Год назад

    I don’t suppose there is a desmos link to this? Just type in some numbers and it does the rotation for me?
    That would be great

  • @Kawasakillchess
    @Kawasakillchess 11 месяцев назад

    Por qué no subes más videos? 😢

  • @fernandojubany687
    @fernandojubany687 Год назад

    Could you give me the matrix operations that produced graph of projection on 9:24 minutes of Part 3? Thanks

  • @tolgacetiner1243
    @tolgacetiner1243 Год назад +1

    Thanks

  • @zeroo8756
    @zeroo8756 Год назад +3

    How to rotate f(x,y) 3D function??!!!!!!

    • @jixpuzzle
      @jixpuzzle Год назад +3

      I think you should try to convert it into parametric form and do it this way :)

    • @QP9237
      @QP9237 7 месяцев назад

      Not sure if youtube will let me share links (hasn’t worked for me before) but I could share a fully configurable parametric-3D desmos graph I made. I set it up so you could define the x,y,z components of the graph as functions of x and y, i.e. X(x,y), Y(x,y), Z(x,y). It allows you to make dummy variables for time/motion so you can animate surfaces, as well having a fully functional Cartesian and spherical trace function that can dynamically scale to the overall parameters of the surface.

    • @SlimEk_
      @SlimEk_ 4 месяца назад

      @@QP9237 please share the link, if RUclips deletes a comment, send the main link (without the domain), and then I can copy and add the domain.

    • @QP9237
      @QP9237 4 месяца назад

      @@SlimEk_ /calculator/dk4saqishd, let me know if that works. If you have any questions or need any help feel free to comment back. My desmos username is sleepyzs
      Sorry for all the extra write up, but hopefully it can be useful for you and anyone else since I tend to be particular with certain aspects and intricacies of my graphs. I used a variety of techniques and functions so people who are just starting to dabble with desmos (or even those who use it) can pick up new tricks.
      Just some details about the graph:
      - I intentionally made it so the color scheme would "look the way it should" in reverse contrast mode (IMO a lot easier on the eyes), but you can easily change C_hsv by playing with the (-)105 value in the nested mod for the hue definition. The other parts of the nested mods control the density/interval of colors since I defined C_hsv as a list (allowing me to color the multipart 3D graph with subtle color offsets)
      - the camera system is setup with degrees as its basis to give you more fine control for viewing angles since radians isn't always as approachable for everyone. Also theta_xy is the "yaw" while theta_xz is the "pitch"; you can either control the camera in panning mode where you can move a 2D draggable point to pan around, or the other option is to use a slider mode labeled in the UI control menu where you can get a more "precise" control of your view angles if panning mode isn't as intuitive for you. Note initially I had a theta_yz but I functionally set that to 0 since it only functionally rotates the overall image in a strictly 2D sense, something you could achieve to similar results with the base camera system.
      - the Zoom slider in the UI controls is a slider with left zooming in and right zooming out.
      - the trace system was inspired by my memories of using a TI-84 in high school, but I wanted to add a spherical trace as well. Every component for the trace system is within the Grapher folder. Note: I tend to make my desmos graphs as minimally redundant as possible so this means using a lot of binary switches to dynamically modify functional parameters, as well as stacking related functions/graphing elements in the same entry line, but everything that is related is together. The only reason something would not be with its associated parts is because of the limitations of element types (list variables, fixed variables, point indices).
      - because I hate repeatedly pressing undo to reset my graphs back to its original configuration, I provided a "tappable" Reset button in the UI control menu that will reset any modified switches/elements in the folders, except for user declared definitions (i.e. X(x,y)=x+y). This should allow you to choose if you want to entirely reset the graph or just use the reverse immediately prior changes.
      - you can graph in a polar mode using r and theta variable definitions in X,Y,Z. The only change is theta has to be called as theta_R which allows you to use it in a 3D context, using plain theta will not do anything. A tip for anyone who may like it: desmos allows you to use the atan2 function which is what you need to make theta_R work, theta_R=tan^-1(y,x) [rather than the typical tan^-1(y/x)]. The atan2 function is technically/implicitly what you actually are using when you're defining the Principle argument for complex numbers (Arg(z) vs arg(z)) as atan2 directly acknowledges the signs of the inputs allowing you to differentiate tan^-1(sqrt(2)/2,sqrt(2)/2) from tan^-1(-sqrt(2)/2,-sqrt(2)/2).
      - because the graph is relatively lightweight (I did 99% of the construction and usage on my iPad) the time/motion variable m animates at relatively smooth framerate (very minimal lag even panning around while animated); if you experience lag either reduce the speed of m or you can alternatively modify n_0 which controls the mapping density of the graph, at base it is set to 200 (it animates perfectly smoothly on my iPad). Note: the line definition (continuous, dashed, points) has a progressively lower impact on the animation, so unless you want a strict wireframe/mesh map, stick to the point map since it generally gives you more granular surface definition.

    • @QP9237
      @QP9237 4 месяца назад

      @@SlimEk_Hey so I posted like you said without the domain but looks like youtube keeps deleting it when try putting any part of link into comments.

  • @charlierd4860
    @charlierd4860 Год назад

    Lets go🎉 episode 3

  • @Alnidru
    @Alnidru Год назад

    Ok, now what about rotate a 4D graph in a 3D space?

  • @Red_Core13
    @Red_Core13 Год назад

    what about if i waht to rotate points in 3D, and i can input XYZ as i want in that point?

  • @SpencerKelly42
    @SpencerKelly42 11 месяцев назад

    no part 4? big sad 😭

  • @martinjoster3282
    @martinjoster3282 Год назад

    If we can project 3d onto 2d... maybe we can project 4d into 3d...?

  • @worseize
    @worseize Год назад

    Brilliant

  • @Sesquipedalia
    @Sesquipedalia Год назад +1

    wOOOOOOO

  • @wigpiipgiw1582
    @wigpiipgiw1582 Год назад

    Ayyyyyyyyyyy

  • @aster2790
    @aster2790 Год назад

    Less goo