Wonderland Tutorial
Ferdinand Strixner
strixner at web.de
Sun Mar 28 14:02:26 UTC 2004
Hi Bert,
these Pooh thingy is very interesting, it's a pity that there doesn't
exist a kind of resource where all existing modules are listed and
briefly described. (Or does something like that exist and I simply
haven't found it yet...)
To your question:
There seems to be a little bug in the Subdivision::constraintOutline:
method. outPoints is a WriteStream that directly manipulates the
pointlist of the newly created PoohSubdivision, so returning the
outpoints is unnecessary. (createPoohActor tried to call a build3DObject
method on that returned point array - what of course failed) So all you
have to do is to throw out the misplaced "^outPoints contents" - line
from the Subdivision constraintOutline: method. Then everything should
work fine.
Greetings,
Ferdinand
Bert Weber wrote:
>Hi,
>
>I'm quite new to Squeak and I was doing some tutorial first. But I run into
>a problem with the fishbowl tuorial.
>After drawing the pooh object I got an error message:
>
>Array(Object) "DoesNorUnderstand: #build3DObject
>
>Below the source code, the error occures in the last line. I'm using Squeak
>3.6 on Windows XP.
>Who can help?
>
>createPoohActor
> | actor pointList box scale center subdivision mesh tex |
> pointList _ self outline.
> pointList reset.
> pointList _ pointList contents.
> pointList size < 2 ifTrue:[
> self clearStroke.
> ^errorSound play].
>
> pointList _ self simplify: pointList.
> pointList _ self smoothen: pointList length: 10.
> pointList _ self regularize: pointList.
> box _ Rectangle encompassing: pointList.
> scale _ bounds extent y * 0.5.
> scale _ 1.0 / (scale @ scale negated).
> center _ box origin + box corner * 0.5.
> pointList _ pointList collect:[:each| each - center * scale].
> subdivision _ PoohSubdivision constraintOutline: pointList.
> mesh _ subdivision build3DObject.
>"<----- Array(Object) "DoesNorUnderstand: #build3DObject ?????????"
>
>
>
>Thx
>
>Bert
>
>
>
>
More information about the Squeak-dev
mailing list
|