In [1]:
require_relative '../sim'
Out[1]:
Out[1]:
Out[1]:
true
In [3]:
sim = Simulator.new([Math::PI/2,Math::PI/2,0.0001,0])
Out[3]:
#<Simulator:0xb8e4fae4 @t=0, @q=[1.5707963267948966, 1.5707963267948966, 0.0001, 0], @dt=0.03, @n_buffer=150>
In [3]:
sim.run
Out[3]:
#<SimWidget:0xb9b07a98 @model_id="4771C1076417009DB0AA4324839563AB", @sync_data={}, @comm=#<IRuby::Comm:0xb9b07944 @comm_id="4771C1076417009DB0AA4324839563AB", @target_name="WidgetModel", @session=#<IRuby::Session:0xb9ab4488 @username="kernel", @session="9d3366f4-9108-4f8a-8400-733d8ac2da86", @msg_id=20, @hmac=cff139101afb0f2c1b5aa6a486a2e5a86ff0a97bae145bbccc0865b61b4e0b13, @last_received_header={"username"=>"username", "msg_id"=>"C3B5EC170020447082D291EDEA74F335", "msg_type"=>"execute_request", "session"=>"7614508EBCA448E88C0DCB8DE1BDF504"}>, @pub_socket=#<ZMQ::Socket:0xb9ab4604 @receiver_klass=ZMQ::Message, @socket=#<FFI::Pointer address=0xb9c8b808>, @name="PUB", @int_cache=nil, @longlong_cache=nil, @more_parts_array=[], @option_lookup=[nil, nil, nil, nil, 1, 2, 2, 2, 0, 0, nil, 0, 0, 1, 0, 0, 0, 0, 0, 0, nil, 0, 1, 0, 0, 0, nil, 0, 0, nil, nil, 0, 2, 0, 0, 0, 0, 0, 0, 0, nil, nil, 0, 0, 0, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 2]>, @msg_callback=#<Method: SimWidget(IRuby::Widget)#handle_msg>>, @msg_callback=#<Method: Simulator#get_msg>>
In [4]:
sim.save_movie(3000)
Out[4]: