Featured Posts

8. Bump Mapping in GLSL8. Bump Mapping in GLSL Introduction Bump mapping is essential in todays computer games, and computer graphics in general. Would you like to know the best thing about it? It is extremely simple to implement. Bump mapping works...

Read more

Swiftless GLSL Shader DeveloperSwiftless GLSL Shader Developer Swiftless GLSL Shader Developer   Version 0.1a Currently Swiftless GLSL Shader Developer is in it's first public release, and is currently in alpha status, meaning it is not complete and may contain...

Read more

Wordpress Optimization Wordpress Website Optimizations Introduction Wordpress itself is a fairly wonderful tool. Since switching to it, I find it is a lot quicker to make changes to my website and it is also quicker to get...

Read more

36. OpenGL Framebuffers36. OpenGL Framebuffers Introduction Frame buffers are one of those mythical things that we have all heard of, but many beginner OpenGL developers avoid because there is not much information about them, and they can be confusing...

Read more

1. Terrain Class1. Terrain Class Terrain is one of those things that so far, hasn't been perfectly recreated in computer graphics. But it is almost there! Looking over a beautiful landscape can be one of the most amazing feelings in the...

Read more

  • Prev
  • Next

3. Maths Lines

Posted on : 25-03-2010 | By : Swiftless | In : Maths

Tags: , ,

3

I am going to start this tutorial now, but I probably will not have time to finish it. But here goes…

The equation of a line can be shown in 2 different forms. There is the General Equation and the Slope-Intercept form. They are:

General Equation: aX + bY = C
Slope-Intercept form: Y = mX + C

I find the slope intercept form best, as it tells you straight out where the formula crosses the y axis at X and the slope of the line is M.

Let us reuse this diagram:
Distance Formula Triangle

Now first we will look at the slope:
The formula for a slope between 2 points is:
M = y2-y1
——
x2-x1

Simple enough. Now to find C, we use the equation Y = mX + C:
(y2) = M * (x2) + C

So we are substituting in one of the set of points, also adding in M which we solved before.

so you end up with:
(y2)
—– – M = C
(x2)

Now that we have both C and M we can determine that the formula is:
y = mX + C by adding in the numbers for C and M.

Now that we have our formula in the slope-intercept form, what about converting that to the General form?

Y = mX + C

Y
— – X = C
M

I will add more onto this later, as it is a tad longer than the others. Stay tuned….

If you have any questions, please email me at swiftless@gmail.com

VN:F [1.9.3_1094]
Please rate so I know where to improve the site. 1 means needs a lot of improvement, 10 means perfect. If you leave a low rating, please state why. I don't want people just coming to bash the site.
Rating: 7.0/10 (1 vote cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
3. Maths Lines, 7.0 out of 10 based on 1 rating

Related posts:

  1. 1. Maths Distance Formula
  2. 5. Maths Vector Dot Product
  3. 2. Maths Pythagoras Theorem
  4. 6. Maths Trigonometry
  5. 4. Maths Vector Length

Comments (3)

Hey Flekken,

That is true, a line itself has no start or end, it technically goes on forever.

Swiftless

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Line doesn’t start or end, only line segment starts and ends in a point.

VA:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.3_1094]
Rating: 0 (from 0 votes)

[...] variables and dependent … to changes in the slope and intercept; make random small changes and …3. Maths Lines | SwiftlessLines, who doesn't love lines. They start at one point and end at another. In fact, lines are [...]

Write a comment

Improve the web with Nofollow Reciprocity.