COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

How to draw rectangles

• Follow

```Hi guys

I need to create a people with rectangles. Since arms can rotate at one point,  I need to draw rectangles with any angles.

Is there any function in matlab responsible for this?

Thanks in advanced
```
 0
Reply zhang 1/1/2010 6:22:04 AM

```"zhang " <xiaoc10@gmail.com> wrote in message <hhk4ac\$7ap\$1@fred.mathworks.com>...
> Hi guys
>
> I need to create a people with rectangles. Since arms can rotate at one point,  I need to draw rectangles with any angles.
>
> Is there any function in matlab responsible for this?
>
> Thanks in advanced

You can use rectangle() with rotate(), or patch() with rotate() (better).
You also draw each of the rectangle's sides individually using line().
```
 0
Reply Husam 1/1/2010 6:30:42 AM

```"Husam Aldahiyat" <numandina@gmail.com> wrote in message <hhk4qi\$88s\$1@fred.mathworks.com>...
> "zhang " <xiaoc10@gmail.com> wrote in message <hhk4ac\$7ap\$1@fred.mathworks.com>...
> > Hi guys
> >
> > I need to create a people with rectangles. Since arms can rotate at one point,  I need to draw rectangles with any angles.
> >
> > Is there any function in matlab responsible for this?
> >
> > Thanks in advanced
>
> You can use rectangle() with rotate(), or patch() with rotate() (better).
> You also draw each of the rectangle's sides individually using line().

I don't know why but rectangle with rotate is not working at al.
does anyone know why?
```
 0
Reply Hyoungsoon 1/4/2010 2:06:04 AM

```"Hyoungsoon Lee" <froverstyl1@gmail.com> wrote in message
news:hhriec\$721\$1@fred.mathworks.com...
> "Husam Aldahiyat" <numandina@gmail.com> wrote in message
> <hhk4qi\$88s\$1@fred.mathworks.com>...
>> "zhang " <xiaoc10@gmail.com> wrote in message
>> <hhk4ac\$7ap\$1@fred.mathworks.com>...
>> > Hi guys
>> >
>> > I need to create a people with rectangles. Since arms can rotate at one
>> > point,  I need to draw rectangles with any angles.
>> >
>> > Is there any function in matlab responsible for this?
>> >
>> > Thanks in advanced
>>
>> You can use rectangle() with rotate(), or patch() with rotate() (better).
>> You also draw each of the rectangle's sides individually using line().
>
> I don't know why but rectangle with rotate is not working at al.
> does anyone know why?

No, because you haven't told us how you're trying to use RECTANGLE with
ROTATE or what happens when you do.  Does it throw an error?  Does it give
the wrong result?  Does it crash MATLAB?  Does it start quoting Monty
Python?  ["It's just a flesh wound."]

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

```
 0
Reply Steven 1/4/2010 4:25:53 AM

3 Replies
1472 Views

(page loaded in 0.039 seconds)

Similiar Articles:

7/23/2012 7:17:48 AM

 Reply: