Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1422

Re: How to make a stickman

From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.postscript
Subject Re: How to make a stickman
Organization Decebal Computing
References <87fvvjg17q.fsf@Aspire.decebal.nl> <alpine.DEB.2.02.1307130422460.27708@ashley.laurelmail.net> <15ef5597-e6a5-403d-bd02-aa78b5ff3f21@googlegroups.com>
Date 2013-07-13 15:46 +0200
Message-ID <87a9lqfu82.fsf@Aspire.decebal.nl> (permalink)

Show all headers | View raw


Op zaterdag 13 jul 2013 07:07 CEST schreef luser:

> On Friday, July 12, 2013 11:28:15 PM UTC-5, ashley willis wrote:
>> On Fri, 12 Jul 2013, Cecil Westerhof wrote:
>>
>>
>>> It will not be very difficult to make a stickman, but I would
>>> suppose that people already made functions for this. So where
>>> could I find functions to draw different style stickmans?
>>>
>>> Resources to draw other type of figures are welcome also
>>> of-course.
>>
>>
>> i have something i did a few years ago in 3D. it's designed for
>> second life avatars (i was trying to get inverse kinematics in
>> there, and i had a formula for 2D, but couldn't figure out the 3D
>> for some reason).
>>
>
> There's a chapter in Jim Blinn's A Trip Down the Graphics Pipeline
> about "Blobby Man" that focuses on the hierarchical transformations
> needed for moving figures.

That is a ‘little’ above my current state of knowledge. But I think it
will be an interesting read.


I have made an initial routine to draw a stick man:
    % Places a stickman at x, y. Two units wide, seven units high.
    /stickman { % x y unit
        3 dict begin
            /unit exch def
            /y    exch def
            /x    exch def
    
            gsave
            newpath
            % start top center
            x unit add  y unit 7 mul add  translate
            % draw head
            0  unit neg  unit  0  360  arc closepath
            % draw body
            0  unit 2 mul neg  moveto
            0  unit 6 mul neg  lineto
            % draw arms
            unit neg  unit 3 mul neg  moveto
            0         unit 4 mul neg  lineto
            unit      unit 3 mul neg  lineto
            % draw legs
            unit neg  unit 7 mul neg  moveto
            0         unit 6 mul neg  lineto
            unit      unit 7 mul neg  lineto
    
            stroke
            grestore
        end
    } def

I would not mind feedback on it. :-D For example: are the ratios
correct?


By the way, I want to expand this function, so that I can draw a range
of stick mans:
    - the default one
    - happy one
    - angry one
    - sad one
    - kneeling
    - …

What is the best way to do this? I mean graphically, but also
programmatically: how to write it so it is easy to use.


I used it to make:
    https://www.facebook.com/photo.php?fbid=593050714080840

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to make a stickman Cecil Westerhof <Cecil@decebal.nl> - 2013-07-12 19:03 +0200
  Re: How to make a stickman ashley willis <"s/^.*/valid/&&print' address'"@hostscript.org> - 2013-07-13 04:28 +0000
    Re: How to make a stickman luser- -droog <mijoryx@yahoo.com> - 2013-07-12 22:07 -0700
      Re: How to make a stickman Cecil Westerhof <Cecil@decebal.nl> - 2013-07-13 15:46 +0200
        Re: How to make a stickman luser- -droog <mijoryx@yahoo.com> - 2013-07-13 16:55 -0700
          Re: How to make a stickman Cecil Westerhof <Cecil@decebal.nl> - 2013-07-14 14:59 +0200
            Re: How to make a stickman ashley willis <"s/^.*/valid/&&print' address'"@hostscript.org> - 2013-07-14 18:37 +0000
            Re: How to make a stickman luser- -droog <mijoryx@yahoo.com> - 2013-07-15 01:06 -0700
              Re: How to make a stickman Cecil Westerhof <Cecil@decebal.nl> - 2013-07-15 12:34 +0200
                Procedure argument comments   (was Re: How to make a stickman) luser- -droog <mijoryx@yahoo.com> - 2013-07-16 09:31 -0700
        Re: How to make a stickman luser- -droog <mijoryx@yahoo.com> - 2013-07-13 18:22 -0700
          Re: How to make a stickman Cecil Westerhof <Cecil@decebal.nl> - 2013-07-14 15:09 +0200

csiph-web