[gradsusr] draw poly
Jeff Duda
jeffduda319 at gmail.com
Thu Mar 1 17:49:04 EST 2018
I guess. I was just hoping there was a built-in function to do this so that
I wouldn't have to iterate 'draw line' n times just to draw an unfilled
n-gon. There are 'draw rec' and 'draw recf' functions, so I figured it
would make sense if there was a 'draw poly' function to correspond to 'draw
polyf' in the same manner. Thank you for the response, though.
Jeff
On Thu, Mar 1, 2018 at 3:31 PM, David Nielsen <davidnielsen at id.uff.br>
wrote:
> Jeff,
>
> You can make a function like the following to draw lines to make a
> polygon. In this case, (ir)regular 4-side polygons. Is this what you meant?
>
>
> ******************* This funtion draws a box
> * Usage:
> * ddbox lat1 lat2 lat3 lat4 lon1 lon2 lon3 lon4
>
> function ddbox(arg)
>
> lat1=subwrd(arg,1)
> lat2=subwrd(arg,2)
> lat3=subwrd(arg,3)
> lat4=subwrd(arg,4)
> lon1=subwrd(arg,5)
> lon2=subwrd(arg,6)
> lon3=subwrd(arg,7)
> lon4=subwrd(arg,8)
>
> 'set line 1 1 12'
>
> 'q w2xy 'lon1' 'lat1
> x1=subwrd(result,3)
> y1=subwrd(result,6)
>
> 'q w2xy 'lon2' 'lat2
> x2=subwrd(result,3)
> y2=subwrd(result,6)
>
> 'q w2xy 'lon3' 'lat3
> x3=subwrd(result,3)
> y3=subwrd(result,6)
>
> 'q w2xy 'lon4' 'lat4
> x4=subwrd(result,3)
> y4=subwrd(result,6)
>
> 'draw line 'x1' 'y1' 'x2' 'y2
> 'draw line 'x2' 'y2' 'x3' 'y3
> 'draw line 'x3' 'y3' 'x4' 'y4
> 'draw line 'x4' 'y4' 'x1' 'y1
>
> return
>
>
>
> 2018-03-01 19:13 GMT-03:00 Jeff Duda <jeffduda319 at gmail.com>:
>
>> Is there a version of the draw polyf function to draw an unfilled polygon?
>>
>> Jeff Duda
>>
>> --
>> Jeff Duda, Research Scientist
>>
>> University of Colorado Boulder
>>
>> Cooperative Institute for Research in Environmental Sciences
>>
>> NOAA/OAR/ESRL/Global Systems Division
>> Boulder, CO
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Jeff Duda, Research Scientist
University of Colorado Boulder
Cooperative Institute for Research in Environmental Sciences
NOAA/OAR/ESRL/Global Systems Division
Boulder, CO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180301/9fe1b16a/attachment.html>
More information about the gradsusr
mailing list