Assign a polygon (or any shape) to a variable and view it with Geometry App
|
01-03-2024, 01:29 AM
Post: #1
|
|||
|
|||
Assign a polygon (or any shape) to a variable and view it with Geometry App
Can anyone help me?
I'm trying to create a simple code that requires the input of a complex number and create a polygon with the real e imaginary parts, so I can view it with the Geometry App. The following code kinda works, just for the input part... EXPORT Polygon1; EXPORT PolygonalDraw() BEGIN INPUT({{ComplexA,[3]}}); Polygon1:= polygon( point(0,0), point(0,RE(ComplexA)), point(2*RE(ComplexA), 2*RE(ComplexA)), point(RE(ComplexA),0)); END; I was hopping that by running this, I can simply click the Plot button and it would be there... |
|||
01-05-2024, 02:37 PM
(This post was last modified: 01-05-2024 05:24 PM by roadrunner.)
Post: #2
|
|||
|
|||
RE: Assign a polygon (or any shape) to a variable and view it with Geometry App
You have to build the instruction you want as a string and store it in the Instruction variable. Here's an example:
Code: #pragma mode( separator(.,;) integer(h32) ) edit: Well you don't *have* to do it that way. There are many ways to do what you want, the example above is one of those. -road |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)