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

### How to draw rectangles

• Email
• 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?

```
 0

See related articles to this posting

```"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?
>

You can use rectangle() with rotate(), or patch() with rotate() (better).
You also draw each of the rectangle's sides individually using line().
```
 0

```"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?
> >
>
> 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

```"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?
>> >
>>
>> 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