So I have moved a little bit further but it seems I am stuck again.

I am using IJulia with Atom and Hydrogen (atom plugin).


   - Compose.set_default_graphic_size() can set the canvas size at most to 
   ~20inches x ~20inches.
   - When using the code from reactive tutorial (below) and running the 
   code, the canvas shows the ball at one position. I have to run the code 
   again to see where did that ball go...


using Reactive, Interact, Compose
function drawball(t)
  y = 1-abs(sin(t)) # The y coordinate.
  compose(context(), circle(0.5, y, 0.04))
end

ticks = fps(60)
timestamps = map(_ -> time(), ticks)
map(drawball, timestamps)



On Sunday, June 12, 2016 at 5:02:30 PM UTC+2, Shashi Gowda wrote:
>
> Yes, this is because the canvas is not square
>
> Run
> Compose.set_default_graphic_size(5inch, 5inch)
>
> Before drawing the picture...
>
> On 11-Jun-2016 8:08 PM, "Michael Borregaard" <[email protected] 
> <javascript:>> wrote:
> >
> > It is not a full answer, but you should check ctxpromise() for the size. 
> I think the distribution is because the canvas is not square and you use 
> relative positions to specify circle centers. You can set the size 
> parameters in the context call. Sorry I realise this is really useless in 
> terms of help but may point you in the right direction.
>

Reply via email to