Using WebEJS to Create and Run Simulations for Moving Ball
macmath.inf.um.es
1. Click on Click to start WebEJS

2. Click on Model

3. Click on Evolution

4. Click on Click to create a page of ODEs

5. Drag highlighted input

6. Click on OK

7. Type "t" to introduce a variable called t for time

8. Type "dt" to introduce a variable called delta time

9. Click on Variables, to start declaring them

10. Click on Click to create a page of variables

11. Click on OK

12. Type "t"

13. Type "0"

14. Type "dt"

15. Type "0.05"

To continue the same idea, declare position x
16. Type "x"

17. Type "0" to set the initial value to zero

18. Type "y" for position in y direction

19. Type "0", again is to set initial value to zero

20. Click on Evolution, to add ability to move variable x and y

In the Evolution page, click on d/dt
21. Click on Evol Page 1

22. Click on x : (double) : or alternatively type in x in the Value field

23. Click on Value

24. Click on OK

25. Click on Evol Page 1, at the d/dt to try to insert the variable y

26. Click on y : (double) : or alternatively type in y on the Value field

27. Click on Value

28. Click on OK

29. Click on Evol Page 1, on the right of the = sign to try to add the Rate value for dx/dt

30. Type "vx"

31. Click on OK

32. Click on Evol Page 1

33. Type "vy"

34. Click on OK

35. Click on Variables

36. Type "vx"

37. Type "1"

38. Type "vy"

39. Type "0"

40. Click on Play/Pause

41. Click on Reset

42. Click on Play/Pause

43. Click on Evolution

44. Uncheck Autoplay

45. Click on Reset

46. Click on Play/Pause

WebEJS 1.0beta
47. Click on Run the simulation

Web EJS launches it own preview on a new tab such as macmath.inf.um.es/static/sessions/da387ee8-b2d2-4639-86c3-8ec4ca0ab275/output/_preview.xhtml
48. Click on Play/Pause

49. Click on Reset

WebEJS 1.0beta
50. Click on View

51. Click on narrativePanel

52. Click on image

53. Click on controlPanel…

54. Click on image

55. Click on IO

56. Click on image

57. Click on controlPanel

58. Drag highlighted image

59. Click on OK

60. Click on controlPanel

61. Click on slider

62. Type "vx"

63. Type "-1"

64. Type "1"

65. Type "0.5"

66. Type "slider for velocity in x direction"

67. Click on Done

68. Click on Run the simulation

macmath.inf.um.es/static/sessions/da387ee8-b2d2-4639-86c3-8ec4ca0ab275/output/_preview.xhtml
69. To debug the error, go to developer mode (click the top right corner, 3 dots and choose'More Tools' and "Developer Tools"

70. inspect the error message and look for clue why it doesn't display correctly. The hint is sometimes unclear, so it is important to add small chunks of edits slowly and check regularly. the error is caused by the tooltip is missing the quotations "" for the strings

WebEJS 1.0beta
71. Type ""slider for velocity in x direction""

72. Click on Done

73. Click on Play/Pause

74. Click on Reset

75. Type "-1"

76. Click on Play/Pause

77. Click on Buttons

78. Drag highlighted image

WebEJS 1.0beta
79. Drag highlighted image

80. Click on OK

81. Click on firstRowPanel

82. Drag highlighted element

83. Click on image

84. Click on slider

85. Click on image

86. Click on Close

87. Click on firstRowPanel…

88. Click on controlPanel

89. Click on image

90. Click on label

91. Click on image

92. Click on label

93. Click on Text

94. Click on Main

95. Type ""vx = ""

96. Click on Done

97. Click on firstRowPanel

98. Click on image

99. Click on label

100. Click on image

101. Click on slider

102. Click on image

103. Drag highlighted input

104. Click on plottingPanel…

105. Click on image

106. Click on MinimumX

107. Type "100%"

108. Type "80vh"

109. Click on Done

110. Click on plottingPanel…

111. Type ""100%""

112. Type ""80vh""

113. Click on Done

114. Click on …

115. Click on controlPanel

116. Type ""100%""

117. Click on Done

118. Click on …

119. Click on controlPanel

120. Type "{"display":"inline-block"}"

121. Click on Done

122. Click on firstRowPanel

123. Type ""inline-block""

124. Click on Done

125. Click on firstRowPanel

126. Click on executionPanel

127. Click on runPauseButton

128. Type ""Play""

129. Type ""Pause""

130. Click on Done

131. Click on Play

132. Click on resetButton

133. Type ""Reset""

134. Click on Done

WebEJS 1.0beta
135. Click on Model

136. Click on Evol Page 1

137. Click on Click to create a page of Events

138. Click on Page name

139. Click on Create page…

140. Type "hit right border"

141. Click on OK

142. Click on hit right border

143. Type "return x -xmax1.0; // Condition for hit right border "

144. Click on hit right border

145. Type "vx = -vx "

146. Click on Done

147. Click on Variables

148. Type "xmin"

149. Type "-1"

150. Type "xmax"

151. Type "1"

152. Type "ymin"

153. Type "-1"

154. Type "ymax"

155. Type "1"

156. Click on Initialization

157. Click on Evolution

158. Click on Play

159. Click on Reset

160. Click on Variables

161. Click on vx

162. Type "dx"

163. Type "0.3"

164. Type "dy"

165. Type "0.3"

166. Click on View

167. Click on shape2D

168. Click on Main

169. Click on SizeX

170. Click on Main

171. Type "dx"

172. Click on SizeY

173. Click on Main

174. Type "dy"

175. Click on Done

176. Click on Play

177. Click on Reset

178. Click on Model

179. Click on Evolution

180. Click on Evol Page 1

181. Click on hit right border

182. Type "return (x+dx) -xmax; // Condition for hit right border "

183. Click on Done

184. Click on Play

185. Click on Reset

186. Click on Evol Page 1

187. Click on hit right border

188. Type "return (x+dx/2) -xmax; // Condition for hit right border "

189. Click on Done

190. Click on Play

191. Click on Reset

192. Click on Evol Page 1

193. Click on hit right border

194. Type "_pause() "

195. Click on Done

196. Click on Play

197. Click on Run the simulation

macmath.inf.um.es/static/sessions/da387ee8-b2d2-4639-86c3-8ec4ca0ab275/output/_preview.xhtml
198. Click on Play

199. Click on Reset

WebEJS 1.0beta
200. Click on Evol Page 1

201. Drag highlighted element

202. Cut text area titled "_pause()"

203. Click on hit right border

204. Type "vx = -vx "

205. Click on Done

206. Click on Reset

207. Click on Play

208. Click on Reset

209. Click on Run the simulation

macmath.inf.um.es/static/sessions/da387ee8-b2d2-4639-86c3-8ec4ca0ab275/output/_preview.xhtml
210. Click on Play

WebEJS 1.0beta
211. Click on Run the simulation

212. Click on Play
