Ask Your Question
0

How to draw a 2D vector?

asked 2014-08-30 06:59:58 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I'm sorry, I'm new to this and I really need to draw 2D vectors. But, I wasn't sure how to go about it...I only have limited Python knowledge and from the looks of it, this runs on Python. I have vector a's trajectory and vector b's trajectory as well... What commands do I put in? I also need to do vector addition...I'd be really grateful if someone could help me out. Thank you. :)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2014-08-30 09:05:10 +0200

FrédéricC gravatar image

Maybe something like that ?

sage: a = vector([1, 2])
sage: b = vector([4, 3])
sage: plot(a, color='red')
sage: plot(a, color='red') + plot(b, color='blue') + plot(a + b, color='black')
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-30 06:59:58 +0200

Seen: 2,196 times

Last updated: Aug 30 '14