Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1431
| 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> <87a9lqfu82.fsf@Aspire.decebal.nl> <80f1d209-6c2c-4462-bf03-ff8bbb577d79@googlegroups.com> |
| Date | 2013-07-14 14:59 +0200 |
| Message-ID | <87oba5e1pv.fsf@Aspire.decebal.nl> (permalink) |
Op zondag 14 jul 2013 01:55 CEST schreef luser:
[snip]
>> 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
>
> I've only looked at the "programmatically" part, so far. For the
> ratios, it's probably best to steal from Da Vinci's Vitruvian Man.
It was not to bad. Da Vinci says a man is 8 times his head, I had 7
times. ;-)
> I've re-written your function to be more "Reid"-style (cf. the green
> book): no dictionary, no variables, re-order the parameters so
> they're used straight off the stack.
That is frowned upon? I will read the book. But first I should read
the blue and red book I understood. Below I have a modified version
from the logo out of the green book.
What certainly is a lot better, is the way before and after stack is
done. I will do that in the future also.
> %!
>
> % unit x y fig -
> /fig {
> gsave translate % unit
> dup dup scale % unit
> 1 exch div setlinewidth
>
> 0 0 moveto
> 1 1 lineto %left leg
> 2 0 lineto %right leg
>
> 1 1 moveto
> 1 2 lineto %body
> currentpoint
> 0 1.5 lineto %left arm
> moveto
> currentpoint
> 2 1.5 lineto %right arm
> moveto
> 0 .2 rlineto %neck
>
> currentpoint .5 add
> .5 -90 270 arc %head
>
> stroke
> grestore
> } def
>
> 50 100 100 fig
Does not the same. The legs look to long for me, but your neck is a
lot better as mine. My arms and legs should also be longer. I'll
tinker with it.
> For the variations of posture, Blobby-Man should really help.
> But you can simplify it a lot. Basically, instead of positions
> for the arms and legs, use Polar Coordinates.
>
> (x,y) = (r*cos(t), r*sin(t))
>
> Then you can modify the angle (t) independently.
That is a very good idea. Thanks.
My modified logo function:
% hasBorder x y logoCW -
/logoCW {
gsave
moveto
{
currentpoint 87 56 rectstroke
} if
currentpoint
/Times-Roman findfont
48 scalefont setfont
4 18 rmoveto
(C) show
-8.5 -14.5 rmoveto
(W) show
moveto
4 8 rmoveto
/Helvetica findfont 11 scalefont setfont
(Cecil) show
8 30 rmoveto
(westerhof) show
grestore
} bind def
false 100 100 logoCW
true 200 100 logoCW
There where a few bugs in the green book version:
- The logo was not placed at current point
(I prefer to give the coordinates as parameters.)
- It did not leave the graphical state untouched
--
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
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