I get a value error on nx_WIN

Thanks,

-- 
Raul

On Sun, Apr 26, 2015 at 3:58 PM, Cliff Reiter <[email protected]> wrote:
> An object animation example follows some remarks.
> I may have found the answer to my question.
> That short script has the correct behavior so long as the last line is run
> in the script and not loaded. If loaded, the same problem occurs. In the
> rast case I am trying to open and update the window under program control.
> This gives me something to investigate.
>
> dawin=: 3 : 0
>
> 0 0 1 1 1 dawin y
>
> :
>
> 'a c b d e'=.x
>
> SC=:WIN_WH&*@((-&(a,d)) %((b-a),c-d)"1)"1
>
> sz=.":WIN_WH
>
> PN=.y,'; Animation window bounds are x: ',(":a),' to ',(":b),' y: ',(":c),'
> to ',":d
>
> nx_WIN ''
>
> z=.'pc ',WIN_nam,' closeok;pn "',PN,'";minwh ',sz,' ;cc g isidraw;'
>
> wd z,';pshow;'
>
> glclear''
>
> DELAY=:e
>
> )
>
>
> dfillcolor=: 3 : 0 NB. Start Fill Color
>
> wd 'psel ',WIN_nam
>
> if. _1 e.y do. glbrushnull ''
>
> else. glrgb y
>
> glbrush''
>
> end.
>
> )
>
>
> NB. ------------------------------------------------
>
> NB. dapoly v Displays animated list of 2-D polygons
>
> dapoly=: 3 : 0 NB. Show polygon
>
> 0 0 0 dapoly y
>
> :
>
> if. (1=$$x) do. X=.(#y)$,:x else. X=.x end.
>
> Y=.x:^:_1 SC 2{."1 y
>
> wd 'psel ',WIN_nam
>
> k=.0
>
> while. k<#y do.
>
> glclear ''
>
> dfillcolor k{X
>
> glpolygon ,k{Y
>
> glpaintx ''
>
> delay DELAY
>
> k=.>:k
>
> end.
>
> )
>
>
> delay=:6!:3
>
> WIN_WH=:500 500
>
> sq=:#: 0 1 3 2
>
> _2 _2 2 2 0.1 dawin 'rot'
>
> rot=:(cos,sin),:-@sin,cos
>
> R=:(rot 1r40p1)&(+/ . *)"1
>
> $pl=:R^:(i.120) sq
>
> 0 255 0 dapoly pl
>
>
>
>
> On 4/26/2015 2:31 PM, Raul Miller wrote:
>>
>> Can you post a simple example of what your setup is like?
>>
>> (Like, for example, minimal code that animates a line or a triangle in
>> some simple way.)
>>
>> Thanks,
>>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to