Skip to main content
Replace equation images with matjax equations and fix some minor mistakes
Source Link
wychmaster
  • 1.3k
  • 2
  • 9
  • 28

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done throughby simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

$$i=\frac{1}{t}C+tP$$

becomes simply:

$$tP$$

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

$$x(t) = \frac{1}{t}C_{x}+tP_{x}$$

But I realize now that is the same as:

$$x(t)=C_{x}+t(P_{x}-C_{x})$$

  

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done through simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

becomes simply:

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

But I realize now that is the same as:

 

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done by simply substituting the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

$$i=\frac{1}{t}C+tP$$

becomes simply:

$$tP$$

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

$$x(t) = \frac{1}{t}C_{x}+tP_{x}$$

But I realize now that is the same as:

$$x(t)=C_{x}+t(P_{x}-C_{x})$$

 

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

I've watched the Pixar In A Box, Maths of Rendering TutorialPixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done through simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

becomes simply:

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

But I realize now that is the same as:

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done through simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

becomes simply:

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

But I realize now that is the same as:

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done through simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

becomes simply:

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

But I realize now that is the same as:

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

Post Undeleted by PolymorphismPrince
Post Deleted by PolymorphismPrince
learnt important information
Source Link

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done through simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

becomes simply:

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

But I realize now that is the same as:

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done through simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

becomes simply:

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for t (the parameter for the parametric ray through the camera and a point on the view plane).

In the tutorial, this is done through simply substituting each the parametric formula for each x, y, and z into the equation of the plane that the triangle lies on. This leaves a single unknown (t).

However, in all the examples and exercises that are given by the tutorial the camera is located at [0,0,0]. As I'm sure you'll understand, this is in many cases unrealistic. Because the camera is at 0, they simplify as follows:

becomes simply:

Which makes for an easy solve. My question is when the camera is not at [0,0,0] should I:

  1. Calculate the coordinates of the plane relative to the camera. (So the camera acts as if it is [0,0,0]
  2. Solve the equation as a quadratic. I'm still confused a bit about why this is a quadratic in the first place. Could someone explain this? And which solution do I use?

Of the two options, which is more acceptable for use in this community? Why? Is one more computationally efficient?

Edit: I think I have found a solution as follows: The parametric equation (which is effectively just a weighted average) is represented like this in the tutorial:

But I realize now that is the same as:

Which is dramatically easier to solve.

So my final question is, which of the three is the most acceptable way to solve for t? I'm assuming the third one.

Source Link
Loading