A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 5 years ago
that algoritmh is to make a cannon rotate over a plot...
var g = setInterval('rotateMe',speed)
function rotateMe()
{ x = length Math.cos(t)
y = length Math.sin(t)
plot = 'position:absolute; top:y; left:x'
document.getElementById('img').position = plot
t = t+angle of rotation
}
something went wrong with this algorithm need checker ^^
anonymous
 5 years ago
that algoritmh is to make a cannon rotate over a plot... var g = setInterval('rotateMe',speed) function rotateMe() { x = length Math.cos(t) y = length Math.sin(t) plot = 'position:absolute; top:y; left:x' document.getElementById('img').position = plot t = t+angle of rotation } something went wrong with this algorithm need checker ^^

This Question is Closed

mattfeury
 5 years ago
Best ResponseYou've already chosen the best response.1You'll have to do something like this. You're wanting to edit the style attribute: document.getElementById('img').style.position = "absolute"; document.getElementById('img').style.top = y; document.getElementById('img').style.left = x;

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0kk but its not the code only algorithm ^^
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.