If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Parametric surfaces

Functions that have a two-dimensional input and a three-dimensional output can be thought of as drawing a surface in three-dimensional space. This is actually pretty cool.  Created by Grant Sanderson.

Want to join the conversation?

  • blobby green style avatar for user Matteo Paiano
    why the fact that both t and s run freely is represented by the blue circle moving around the red one and not vice versa?
    (48 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Will Tan
      One input I can offer is to look at the z-coordinate. Since the z-coordinate is represented by sin s, the range of the z-coordinate can only range from -1 and 1. To have the red circle moving around the blue one is impossible as the z-coordinate will have to take values higher than 1 and lower than -1. Hence, the blue has to move around the red one.

      Another way to confirm this is to plot more outputs by rendering one input constant and the other varied for strategic values such as pi/2, you may find that there are in fact many circles similar to the blue one surrounding the red circle.
      (30 votes)
  • orange juice squid orange style avatar for user David Gretzschel
    I wish the axis were labeled :(
    (21 votes)
    Default Khan Academy avatar avatar for user
    • mr pants green style avatar for user zazke grt
      Here's a tip: 1. the z-axis is usually located vertically and fixed.
      2. Look at the arrows, they point towards the "positive direction" of the axis. The cartesian coordinates always have this sort of orientation that you can recall by the "right hand rule". Search it on google images it's very easy to remember. then you can always tell which axis is which whenever you have 1.
      (3 votes)
  • starky ultimate style avatar for user Anna Fagberg
    2.12
    i think there is an error here, 1+ (-1)*1 does not equal 2 :)
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Jeromy Stewart
    Great video and the series is too. At the end of this video when you describe how to visualize the 3d shape based on the two (2d) plots that result from holding one input value constant ... you demonstrate that the visualization intuition comes by rotating the second circle about the first. How do you know that the converse was not the correct answer? In other words rotating the first circle about the second.
    (7 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user samad19472002
    For parametric surfaces it is the necessary that input should have two parameters ? If in input I have one parameter and at output I have 3-dimensional vector can I not generate the surface ?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Chim Richalds
      One input will give you a parametric curve instead of a surface. Picture a function in 2D space, it is a curve instead of a plane. Now make it a function of 2 variables and you can create a solid 2D object. We can do the same in 3 dimensions and our curve (our single parameter function) now moves in 3 dimensions instead of 2. Now we put in our 2 parameter function, which was a surface in 2 dimensions and allow it to move in 3 dimensions and we have a parametric surface. Kind of like taking a 2-dimensional sheet of paper and rolling or bending it into the third dimension. In this case our 2 parameters are length and width. If we took a single parameter object, say a piece of string and bent it into 3 dimensions it would still be a curve and not a surface. This is how I made sense of things when I first learned it, hope it helps you too.
      (7 votes)
  • blobby green style avatar for user Natrah Arifin
    Shouldn't the blue circle appear on the negative x-axis coz f(π, s) = - (3+ Cos S), 0, Sin S
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user sabuna.mumladze2005
    Why did taking the second graph and rotating it around the first result in the proper shape (Donut lol), but if we took the first function and rotated it around the second it would result in a different shape? Is the order of visualization important?
    (By the first graph I mean the circle drawn when s was constant and t changed, and by the second graph I mean when t was constant and s changed).
    (4 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Tushar Pal
    You got those two circles by letting one variable run freely keeping the other one constant. But those particular circles are a result of choosing those specific constants for s and t (s=0 and t=pi in each case). If instead you chose other arbitrary constants, wouldn't they yield different shapes, and most importantly wouldn't it change the final curve itself??
    (4 votes)
    Default Khan Academy avatar avatar for user
  • duskpin tree style avatar for user Radek
    do you think I could do something like that in matlab? I'll try
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user claws
    While plotting this graph, do the axes represent t , s & z?
    (2 votes)
    Default Khan Academy avatar avatar for user

Video transcript

- So I have here a very complicated function. It's got a two-dimensional input, two different coordinates to its input, and then a three-dimensional output. Specifically, it's a three-dimensional vector, and each one of these is some expression, its a bunch of cosines and sines that depends on the two input coordinates. And in the last video, we talked about how to visualize functions that have a single input, a single parameter like T, and then, a two-dimensional vector output. So some kind of expression of T and another expression of T. And this is sort of the three-dimensional analog of that. So what we're going to do, we're just going to visualize things in the output space, and we're gonna try to think of all the possible points that could be outputs. So, for example, let's just start off simple, let's get a feel for this function by evaluating it at a simple pair of points. So, let's say we evaluate this function F, at T equals zero, I think will probably be pretty simple, and then S is equal to pi. So let's think about what this would be. We go up and we say, okay, T of zero, cosine of zero is one, so this whole thing is gonna be one, same with this one. And sine of zero is zero. So this over here's gonna be zero, and this is also gonna be zero. Now cosine of pi is negative one. So this here's gonna be negative one. This one here's also gonna be negative one. And then sine of pi, just like sine of zero, is zero. So this whole thing actually ends up simplifying quite a bit so that the top is three times one plus negative one, one times negative one is negative one, and we get two. Then we have three times zero plus zero, so the Y component is just zero, and then the Z component is also zero. So what that would mean is that this output is gonna be the point that's two along the x-axis, and, there's nothing else to it, it's just two along the x-axis. So go ahead and--whoop, move the graph about, add that point there. So that's what would correspond to this one particular input, zero and pi. And, you know you can do this with a whole bunch, and you might add a couple of other points based on other inputs that you find. But this would take forever, to start to get a feel for the function as a whole. And another thing you can do, is say, okay, maybe rather than thinking of evaluating at a particular point, imagine one of the inputs was constant. So let's imagine that S stayed constant at pi. But then we let T range freely. So, that means we're gonna have some kind of different output here. And, we're gonna let T just be some kind of variable while the output is pi. So what that means is we keep all of these, these negative one, negative one, and zero for what sine of pi is. But the output now is gonna be three cosine of T, cosine of T, plus negative one times the cosine of T, so it's gonna be minus cosine of T. The next part is gonna still be three sine of T, this is no longer zero. I should probably erase those guys actually so... We're no longer evaluating (inaudible) when T was zero. So, three times sine of T, that's just still the function that we're dealing with. Three, sine of T, and then minus one times sine of T. So minus sine of T. Keep drawing it in green just to be consistent. And then the bottom stays at zero. And this whole thing actually simplifies, three cosine T minus cosine T, that's just two cosine T. And then the same deal for the other one. It's gonna be two sine of T. So this whole thing, actually simplifies down to this. So this is again when we're letting S stay constant and T ranges freely. And when you do that, what you're gonna end up getting is a circle that you draw. And you can maybe see why it's a circle 'cause you have this cosine/sine pattern. It's a circle with radius two, and it should make sense that it runs through that first point that we evaluated. So that's what happens if you let just one of the variables run. But now let's do the same thing, but think instead of what happens is S varies and T stays constant. I encourage you to work it out for yourself, I'll go ahead and just kind of draw it, because I kinda wanna give the intuition here. So in that case you're gonna get a circle that looks like this. So again I encourage you to try to think through for the same reasons. Imagine that you let S run freely, keep T constant at zero. Why is that you would get a circle that looks like this? And in fact, if you let both T and S run freely, a very nice way to visualize that is to imagine that this circle, which represents S running freely, sweeps throughout space as you let T run freely. And what you're gonna end up getting when you do that, is a shape that goes like this. This is a doughnut. We have a fancy word for this in mathematics we call it a torus. But it turns out the function here is a fancy way of drawing the torus. And in another video I'm gonna go through in more detail if you were just given the torus, how you can find this function, how you can kind of get the intuitive feel for that. And in that it'll involve going through, in a bit more detail, why when you sweep the circle out it gets the torus just so. And what the relationship between this red circle and the blue circle is. But here I just kind of want to give an intuition for what parametric surfaces are all about, how it's a way of visualizing something that has a two-dimensional input and a three-dimensional output.