NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
July 07, 2020, 01:54:15 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  
An interdisciplinary approach. ...Wisdom
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

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

Posts: 1796


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


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 413 times.)
« Last Edit: December 22, 2010, 01:43:53 pm by lookang » Logged
Hero Member
Offline Offline

Posts: 1796


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


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
An interdisciplinary approach. ...Wisdom
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Vector Addition « 1 2 »
Fu-Kwun Hwang 38 329902 Last post December 29, 2012, 01:13:07 pm
by koclup1580
Represent a vector as horizontal and vertical components applet
lookang 14 20615 Last post May 05, 2008, 07:13:12 pm
by lookang
Circular motion: acceleration always perpendicular to velocity
Fu-Kwun Hwang 7 77695 Last post October 21, 2015, 01:32:10 pm
by freddygon
Circular motion: acceleration always perpendicular to velocity
ahmedelshfie 0 5386 Last post June 08, 2010, 06:43:50 pm
by ahmedelshfie
vector sum/substract
Fu-Kwun Hwang 0 4977 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.042 seconds with 23 queries.since 2011/06/15