Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to draw a simple 3D-Vector?

855 views
Skip to first unread message

Lorenz Hipp

unread,
Aug 9, 2003, 12:17:47 PM8/9/03
to

Hi everyone,

after successfully installing SciLab 2.7 (thanks Sullivan!) I now need
to draw
a simple 3D-vector (for Example vektor_a = [2;-1;-2] ) in a 3D-grid
field, like I can
draw with my own hands. :-)

It seems that the plot3d-functions and the champ-functions are not the
solution for this task, but I wonder how I can draw the vector ?!?

Does someone know how to do this ?

Lorenz Hipp

Enrico Segre

unread,
Aug 10, 2003, 6:07:44 AM8/10/03
to

Perhaps (if that is what you mean -- a solid arrow starting at [0,0,0]):

[xx,yy,zz]=spaghetti([0;2],[0;-1],[0;-2]); plot3d(xx,yy,zz)

spaghetti is a function of the ENRICO toolbox. See also champ3, shadesurf,
shadesurf2, etc.

hth enrico

Lorenz Hipp

unread,
Aug 13, 2003, 9:35:51 AM8/13/03
to
Enrico Segre schrieb:

>
> Perhaps (if that is what you mean -- a solid arrow starting at [0,0,0]):
>
> [xx,yy,zz]=spaghetti([0;2],[0;-1],[0;-2]); plot3d(xx,yy,zz)
>
> spaghetti is a function of the ENRICO toolbox. See also champ3, shadesurf,
> shadesurf2, etc.
>
> hth enrico

thanks enrico, your toolbox and especially the spaghetti-function is
surely useful, but not
exactly the thing I need. I am now workin' for eight days with scilab
and i am getting angry
about my professor's decision, that I have to use scilab to do these
tasks; this means not,
that scilab is not worth a look, but it is, hmm, kinda bit confusing.

like another problem I have:
if it may be possible to draw a triangle in a 2D-world (A=(0,2),
B=(8,8), C=(12,-3) )
with scilab (and I guess it IS possible) then it is hard to find out how.
actually I can draw a line from point A to B to C in a graphics window
with a x-axis and a
y-axis and grids and so on, but I don't know, how to draw the last line
from point C to point A...?!?


lorenz hipp

Rainer von Seggern

unread,
Aug 13, 2003, 10:42:55 AM8/13/03
to

> I am now workin' for eight days with scilab
> and i am getting angry
> about my professor's decision, that I have to use scilab to do these
> tasks; this means not,
> that scilab is not worth a look, but it is, hmm, kinda bit confusing.
>
> like another problem I have:
> if it may be possible to draw a triangle in a 2D-world (A=(0,2),
> B=(8,8), C=(12,-3) )
> with scilab (and I guess it IS possible) then it is hard to find out how.
> actually I can draw a line from point A to B to C in a graphics window
> with a x-axis and a
> y-axis and grids and so on, but I don't know, how to draw the last line
> from point C to point A...?!?
>
>
> lorenz hipp
>

Hi !
In Scilab do: apropos polygon
Try that functions, e.g. xpoly
Greetings,
Rainer

Enrico Segre

unread,
Aug 13, 2003, 12:45:31 PM8/13/03
to
On Wed, 13 Aug 2003 15:35:51 +0200, Lorenz Hipp wrote:
> thanks enrico, your toolbox and especially the spaghetti-function is
> surely useful, but not exactly the thing I need.

so what is what you need?

> like another problem I have:
> if it may be possible to draw a triangle in a 2D-world (A=(0,2),
> B=(8,8), C=(12,-3) )

A=[0 2]; B=[8 8]; C=[12 -3]; ABC=[A;B;C];
xbasc();plot2d(ABC(:,1),ABC(:,2),0);xfpolys(ABC(:,1),ABC(:,2),4)

> actually I can draw a line from point A to B to C in a graphics window
> with a x-axis and a
> y-axis and grids and so on, but I don't know, how to draw the last line
> from point C to point A...?!?

xbasc();plot2d(ABC([1 2 3 1],1),ABC([1 2 3 1],2))

Enrico Segre

unread,
Sep 23, 2004, 10:39:09 AM9/23/04
to
On Wed, 13 Aug 2003 15:35:51 +0200, Lorenz Hipp wrote:
> thanks enrico, your toolbox and especially the spaghetti-function is
> surely useful, but not exactly the thing I need.

so what is what you need?

> like another problem I have:


> if it may be possible to draw a triangle in a 2D-world (A=(0,2),
> B=(8,8), C=(12,-3) )

A=[0 2]; B=[8 8]; C=[12 -3]; ABC=[A;B;C];
xbasc();plot2d(ABC(:,1),ABC(:,2),0);xfpolys(ABC(:,1),ABC(:,2),4)actually I can draw a line from point A to B to C in a graphics window

> with a x-axis and a
> y-axis and grids and so on, but I don't know, how to draw the last line
> from point C to point A...?!?

xbasc();plot2d(ABC([1 2 3 1],1),ABC([1 2 3 1],2))

0 new messages