473,385 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

finding the second coordinate

HI,

How do you find the other endpoint of a line given one endpoint and the
slope of the line.

Also how do you display the coordinate on the computer screen knowing
that the Y axis (of the raster display) runs in the reverse direction of
a normal graph.
ex: given two points
x1 = 100
y1 = 600

and given an angle
45 degrees ie the slope(m)of the line is 1
and given the distance of 206 units
how do I find x2 and y2(the other endpoint of the line)?

how do i display it on the computer screen.

thanks,
Ashutosh

Jul 17 '05 #1
2 6056

"Ashutosh Iddya" <u2******@anu.edu.au> wrote in message
news:3f********@clarion.carno.net.au...
HI,

How do you find the other endpoint of a line given one endpoint and the
slope of the line.

Well use the formula of slope

i,e slope between x1, y1 and x2, y2 = y2-y1/x2 -x1

Also how do you display the coordinate on the computer screen knowing
that the Y axis (of the raster display) runs in the reverse direction of
a normal graph.
ex: given two points
x1 = 100
y1 = 600

and given an angle
45 degrees ie the slope(m)of the line is 1
and given the distance of 206 units
how do I find x2 and y2(the other endpoint of the line)?
use the same slope formula and the also pythgoras theorem.

example :

x2, y2
x1,y1

then slope = y2 - y1/ x2 -x1

and by pythgoras therom square of 206 = square of (x2 - x1) + square
of (y2 - y1)



how do i display it on the computer screen.

thanks,
Ashutosh

Jul 17 '05 #2
you can also use the angle to represent the slope if you like trig

slope = tan(theta) = 1 so theta = arctan(1) = 45 degrees
then x2 = x1 + 206*cos(theta) = 100 + 206*0.7071 = 245.6626
and y2 = y1 + 206*sin(theta) = 600 + 206*0.7071 = 745.6626

phil...

"Vijay Singh" <vi*******@hotmail.com> wrote in message news:C%*****************@news-binary.blueyonder.co.uk...

"Ashutosh Iddya" <u2******@anu.edu.au> wrote in message
news:3f********@clarion.carno.net.au...
HI,

How do you find the other endpoint of a line given one endpoint and the
slope of the line.


Well use the formula of slope

i,e slope between x1, y1 and x2, y2 = y2-y1/x2 -x1

Also how do you display the coordinate on the computer screen knowing
that the Y axis (of the raster display) runs in the reverse direction of
a normal graph.
ex: given two points
x1 = 100
y1 = 600

and given an angle
45 degrees ie the slope(m)of the line is 1
and given the distance of 206 units
how do I find x2 and y2(the other endpoint of the line)?


use the same slope formula and the also pythgoras theorem.

example :

x2, y2


x1,y1



then slope = y2 - y1/ x2 -x1

and by pythgoras therom square of 206 = square of (x2 - x1) + square
of (y2 - y1)





how do i display it on the computer screen.

thanks,
Ashutosh


Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ashutosh Iddya | last post by:
HI, How do you find the other endpoint of a line given one endpoint and the slope of the line. Also how do you display the coordinate on the computer screen knowing that the Y axis (of the...
4
by: spivee | last post by:
I'm having an odd type of issue. I want to be able to pass an element name in my javascript event and find the location of the element, be it a div, span, img whatever, specifically the top and...
8
by: nescio | last post by:
hello, i have a script that finds the x and y from the mouse position, this works fine. but now i have an image in a layer : <div id='someLayer'> <img src='someImage.jpg'> </div>
0
by: peradino | last post by:
Hi I have a problem when I want to know how far my cursor is from the top of pictureBox. I can get mouse coordinate but it is screen coordinate. I can get the top position of my pictureBox...
9
by: Eric.Gabrielson | last post by:
Hello, I am very knew to python and am attempting to write a program in python that a friend of mine is having to write in java. I am doing this for fun and would like some help as to how i can...
28
by: galathaea | last post by:
On Mar 2, 11:29 pm, galath...@veawb.coop (galathaea) wrote: still being very naive about this whole crackpot / crank thing i accidentally let the engineer inside think too hard about this ...
10
by: sklett | last post by:
I have a situation where I'm getting in Image that has a gray (solid, same color) background with a smaller white rectangle inside. The position is not always the same. What I need to do is...
0
by: jigsmshah | last post by:
I need to print a text file .When i print it ,it is not printed exactly form 0,0 coordiante of the page. I mean the top most left corner.It is leaving some margin from top and from left.The code is...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.