2009/11/17

PostScript Repeated Shapes

Program01-RepeatedShapes.ps

% Repeated Shapes
% BlueBook P.134 - 135

% --- variables ------------------------
/power 1.75 def

% --- procedures -----------------------
/tran {
    /proc exch def
    /proc load
    gsave
    proc
    grestore
} def

/inch {
    72 mul power mul
} def

/wedge {
    newpath
    0 0 moveto
    1 0 translate
    15 rotate
    0 15 sin translate
    0 0 15 sin -90 90 arc
    closepath
} def

% --- main -----------------------------
{
    1 inch 1 inch translate
    1 inch 1 inch scale
    wedge 0.02 setlinewidth
    stroke
} tran

-225 0 translate

{
    4.25 inch dup translate
    1.75 inch dup scale
    0.02 setlinewidth
    1 1 12 {
        12 div setgray
        {
            wedge
            {
                fill
            } tran
            0 setgray
            stroke
        } tran
        30 rotate
    } for
} tran

showpage

 

PostScript(R) Language Tutorial and Cookbook (APL)

PostScript(R) Language Tutorial and Cookbook (APL)

posted with amazlet at 09.10.07

Adobe Systems Inc.
Addison-Wesley Professional
売り上げランキング: 235737

おすすめ度の平均: 5.0

5 まず最初に読むべき入門書
5 効率の良いPostScript書くなら…

Amazon.co.jp で詳細を見る

0 件のコメント:

コメントを投稿