Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder7.news.weretis.net!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Richard Ashbery Newsgroups: comp.sys.acorn.programmer Subject: Re: Rotating a Colour-Filled Square Date: Sun, 17 Nov 2019 15:34:33 +0000 (GMT) Organization: None Lines: 35 Message-ID: <5814663fc5basura@invalid.addr.uk> References: <5811cae024basura@invalid.addr.uk> <58124834ffbasura@invalid.addr.uk> <58125f40fdbasura@invalid.addr.uk> <5812df5497basura@invalid.addr.uk> <5813d0c48ebasura@invalid.addr.uk> <58145cb23cbasura@invalid.addr.uk> X-Trace: individual.net o0/t7+4xpdSN5nF2AQBR2Q3Or7QFlsqvu2f94RSryz4U2DZ0g1 X-Orig-Path: uwclub.net!richard.ashbery Cancel-Lock: sha1:v0NHkJttWLpCJycLEqbNBypmzIM= User-Agent: Pluto/3.16 (RISC OS/5.25) NewsHound/v1.52-32 Xref: csiph.com comp.sys.acorn.programmer:5890 In article , Steve Fryatt wrote: > On 17 Nov, Richard Ashbery wrote in message > <58145cb23cbasura@invalid.addr.uk>: > > 4 lines of code should do it... > > > > FOR rotate = 0 TO PI STEP PI/4 GCOL RND(10) RECTANGLE FILL > > 0,0,600,400,rotate NEXT rotate > > > > OK it can't be done but could it be implemented in some form? > Um, why not > FOR rotate = 0 TO PI STEP PI/4 GCOL RND(10) > PROCrectangle(0,0,600,400,rotate) NEXT rotate > from my previous post? > > Only by substituting ELLIPSE for RECTANGLE will it work. > Or by writing a procedure to do it quickly whenever you need it. > That's the fundamental point of programming: break down what you > need to do into chunks, and write re-usable code to do those > things. Spend half an hour perfecting PROCrectangle() once, and you > never need to do it again. Hard to argue with you on this Steve but these days my memory lets me down. My way: I don't have to remember where I've stashed 6 months down the line. All right I do have to remember the very simple ELLIPSE FILL construct and then substitute RECTANGLE but then I'm away. Richard