|
From: | Anthony Andriano |
Subject: | Re: help drawing a polygon using drawPolygon |
Date: | Tue, 21 Feb 2017 08:41:09 -0700 |
On Tue, Feb 21, 2017 at 7:47 AM, Anthony Andriano <address@hidden> wrote:a= [ 1 1 ; 2 3; 4 2]______________________________Hello,I've been looking at the documentation for a while and I can't figure out what I'm doing wrong. There doesn't seem to be an example to help guide a beginner in this process and the terms aren't exactly clear.I'm trying to draw a triangle with the coordinates (-1, -2), (0, -2), and (1, -2). The documentation for drawPolygon suggests it can take a list of coordinates or some type of array, but I can't find any examples or explanations for how the data should be entered and nothing I've tried has worked.drawPolygon(COORD) - what does it mean to 'pack' coords into a single array? How does one accomplish this?drawPolygon(PX, PY) - how do you specify the coordinates in different arrays? I tried passing in [-1 -2], [0 2], [1 -2] as well as [-1; -2], [0; 2], [1; -2] to no avail.drawPolygon(POLYS) - I looked up cell arrays, but none of the notation I've tried has worked here.My goal is to draw a triangle at the given coordinates and then draw it again on the same plot using a different color after applying a linear transformation to rotate it. Any help or guidance anyone can offer would be greatly appreciated.Thanks,Tony_________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
drawPolygon(a)px=[-1 2 6 -1]py=[-3 4 -1 -3]drawPolygon(px',py')--
[Prev in Thread] | Current Thread | [Next in Thread] |