»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Off Topic Community

Reply
 
LinkBack Thread Tools Display Modes
Old 09-27-2002, 01:56 PM   #1 (permalink)
Registered User
 
mAdMaLuDaWg's Avatar
 
Join Date: Sep 2002
Location: NJ, USA
Posts: 957
mAdMaLuDaWg is on a distinguished road
Physics Problem :(!

Hey,
I'm having a problem with this stupid problem. Could someone help me solve it? I know u gotta use the dot product but I could get only one equation in x and y, I can't seem to get the second, hence I can't solve it...
So here's the problem.. gotta use vectors:
An artist draws a line from the pixel location (10,20) to location (210,200). She wishes to draw a second line that starts at (10,20), is 250 pixels long, and measured at an angle of 30 degrees measured clockwise from the first line. At which pixel location should this second line end?
Thx in advance.

__________________
P@yce,
mAdMaLuDaWg
mAdMaLuDaWg is offline   Reply With Quote
Old 09-27-2002, 02:19 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: Clovis, CA
Posts: 2,481
caddmannq is on a distinguished road
X= 254.5485 Y= 71.9233

I cheated, using AutoCAD.
caddmannq is offline   Reply With Quote
Old 09-27-2002, 02:21 PM   #3 (permalink)
Registered User
 
krohnjw's Avatar
 
Join Date: Oct 2001
Location: ~/
Posts: 2,567
krohnjw is on a distinguished road
Send a message via AIM to krohnjw
You just need to use trig there. Use the initial given coordinates to set up a triangle. You can then grab the initial angle from the horizontal. With that you can get the end pixel coordinates using the X and Y coordinates 250 cos X and 250 sin X as your change in X and Y.
krohnjw is offline   Reply With Quote
Old 09-27-2002, 03:45 PM   #4 (permalink)
Registered User
 
mAdMaLuDaWg's Avatar
 
Join Date: Sep 2002
Location: NJ, USA
Posts: 957
mAdMaLuDaWg is on a distinguished road
caddmanq, I dunno how u got that answer coz the answer is (87,258)

I could do it using trig, but I gotta do it using vectors and the dot product...

This is what I did:
A=(10,20) ; B=(210,200); C=(x,y)
vector AB=200i+180j
vector BC=(x-10)i+(y-20)j
AB.BC=200(x-10)+180(y-20)=|AB||BC|cos(30)
200(x-10)+180(y-20)=(250)(269)cos(30)

So I get an equation in x & y, I need one more equation to solve, and I got no idea how to get it !
__________________
P@yce,
mAdMaLuDaWg
mAdMaLuDaWg is offline   Reply With Quote
Old 09-27-2002, 04:28 PM   #5 (permalink)
Registered User
 
Join Date: Oct 2001
Location: Clovis, CA
Posts: 2,481
caddmannq is on a distinguished road
That's what you get if you go 30 degrees counterclockwise.
exactly: X= 87.3073 Y= 257.7469

But your conventions might be different.

AutoCAD places 0,0 at the lower left. Angles are measured same as trig class: counterclockwise, but I went clockwise as per your first post.

I also set my precision to 4 decimals, but internal calculations are at 15 decimals & then rounded off.

<edit cause I can't type today...>

Last edited by caddmannq; 09-27-2002 at 04:31 PM.
caddmannq is offline   Reply With Quote
Old 09-27-2002, 04:34 PM   #6 (permalink)
Registered User
 
mAdMaLuDaWg's Avatar
 
Join Date: Sep 2002
Location: NJ, USA
Posts: 957
mAdMaLuDaWg is on a distinguished road
Damn this problem is killin me... ne1 gots any idea?
__________________
P@yce,
mAdMaLuDaWg
mAdMaLuDaWg is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 08:23 PM.