NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
December 14, 2017, 08:27:46 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Wisdom consists of the anticipation of consequences. ..."Norman Cousins(1913-1990, American author)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Ejs Open source java applet Resolving a Vector in 2 perpendicular directions  (Read 8430 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
on: March 01, 2009, 12:04:14 am »

Resolving a Vector in 2 perpendicular directions by lookang
original source code by hwang fu-kwun, remixed for helping visualization of components

reference:
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=634.msg2195#msg2195
http://www.walter-fendt.de/ph14e/forceresol.htm

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


* resolvevectorlookang.PNG (53.95 KB, 1280x1024 - viewed 300 times.)
« Last Edit: December 22, 2010, 01:43:53 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: March 02, 2009, 06:00:50 am »

more

1. added centre of (x,y) to make drawable visible
2. used actual length instead of unit length  xp=x+Math.sqrt(dx2*dx2+dy2*dy2)*Math.cos(Math.atan2(dy2,dx2)-Math.atan2(dy1,dx1))*Math.cos(Math.atan2(dy1,dx1)); // xp = x + component cta1
yp=y+Math.sqrt(dx2*dx2+dy2*dy2)*Math.cos(Math.atan2(dy2,dx2)-Math.atan2(dy1,dx1))*Math.sin(Math.atan2(dy1,dx1)); //
3. added
Rcos = R*Math.cos((Math.atan2(dy2,dx2)-Math.atan2(dy1,dx1)));
Rsin = R*Math.cos((Math.atan2(dy2,dx2)-Math.atan2(dy1,dx1)));
4. change the logic of drawing the angle polyon to
dc = (Math.atan2(dy2,dx2)-Math.atan2(dy1,dx1))/(n-2);// modify to draw from black line sing dx and dy as inputs
px[0]=x; // for drawing angle polygon
py[0]=y; //
for(int i=1;i  c=Math.atan2(dy2,dx2)-(i-1)*dc;  // modify to work drawing from black line
//  if(c<-pi)c+=2*pi; // no necessary
  px=x+d*Math.cos(c); //
  py=y+d*Math.sin(c); //
}
5. added functions to make slider draggable to control the graphics, thanks Prof Hwang!


*** There are 7 more attached files. You need to login to acces it!
« Last Edit: December 22, 2010, 01:44:04 pm by lookang » Logged
Pages: [1]   Go Up
  Print  
Wisdom consists of the anticipation of consequences. ..."Norman Cousins(1913-1990, American author)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Vector Addition « 1 2 »
Misc
Fu-Kwun Hwang 38 311253 Last post December 29, 2012, 01:13:07 pm
by koclup1580
Represent a vector as horizontal and vertical components applet
misc
lookang 14 17727 Last post May 05, 2008, 07:13:12 pm
by lookang
Circular motion: acceleration always perpendicular to velocity
Dynamics
Fu-Kwun Hwang 7 61195 Last post October 21, 2015, 01:32:10 pm
by freddygon
Circular motion: acceleration always perpendicular to velocity
dynamics
ahmedelshfie 0 4704 Last post June 08, 2010, 06:43:50 pm
by ahmedelshfie
vector sum/substract
misc
Fu-Kwun Hwang 0 2820 Last post September 28, 2014, 08:26:12 am
by Fu-Kwun Hwang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.052 seconds with 23 queries.since 2011/06/15