Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Richard Ashbery Newsgroups: comp.sys.acorn.programmer Subject: Rotating a Colour-Filled Square Date: Tue, 12 Nov 2019 14:05:03 +0000 (GMT) Organization: None Lines: 15 Message-ID: <5811cae024basura@invalid.addr.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: individual.net HZFT3+RlnBAq46avuvLysgdgGKpL+KrLjER/ahsgnrVTSpmn4m X-Orig-Path: uwclub.net!richard.ashbery Cancel-Lock: sha1:jcEaI02mISmZRrpRphfYyLaDfsg= User-Agent: Pluto/3.16 (RISC OS/5.25) NewsHound/v1.52-32 Xref: csiph.com comp.sys.acorn.programmer:5865 Rotating a square can be done with MODE 1920,1080,32 FOR theta = 0 TO 360 STEP 90 x = 1000 * SIN(RAD(theta+45)) y = 1000 * COS(RAD(theta+45)) IF theta = 0 MOVE 1920+x, 1080+y ELSE DRAW 1920+x, 1080+y NEXT By altering the angle theta+45 to theta+55 the square can be made to rotate 10°. If I try something similar with a filled square using 'RECTANGLE FILL' or PLOT &65 I'm unable to rotate it. Has anyone got a simple routine that rotates a colour filled square about the screen centre?