| Author |
Comment/Response |
Bo Le
|
10/02/03 01:13am
Hi,
A possible approach would be:
(1st) to generate n randomly orieanted vectors with length 1:
randomVectors[n_]:=Table[
With[{fi=2 \[Pi] Random[]},
{Cos[fi],Sin[fi]}],
{n}];
(2nd) to place the vectors on the plane and visualize them, choosing isotropically distributed origin:
visualizeVectors[vectors_]:=Show[
Graphics[
With[{x=5 Random[],y=3 Random[]},
Arrow[{x,y},{x,y}+#]]&/@vectors],
Frame\[Rule]True,
AspectRatio\[Rule]Automatic]
Note 5 and 3 in the setting of x and y, this is the domain. Note also you can use a pure Line object to visualize vectors.
Hope that helps?
Bo Le @ Slovenia
URL: , |
|