How can I manipulate Math symbols in a web page? [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am building a web page dedicated to explaining Math and other topics. I'd like to animate the process of doing certain mathematical steps like adding numbers and solving an equation. I know I can create an animated .gif but this comes with the draw back of having to find some way of drawing the symbols in a picture or maybe exporting a LaTeX rendering, etc. I'm wondering if there is some more programmable, systematic solution.
Suppose for concreteness that I want to animate the solution to 2(x-1)=10 and then several other similar equations, and the process of dividing 123 by 45.
For some context, I have some decent but non-pro skills with HTML, CSS, JavaScript, other C-like languages, Python, and similar stuff.

What I'd do (this is broad) is take the input of each number or symbol a person types and moves them to a specific area on a canvas with JavaScript. For example, every time a person enters in a number it will move that input into a small box or something. From there you can just use the symbols to add/subtract/multiply etc. If you wanted to make this smooth so that it goes in multiple steps you could always you the setTimeout function with JavaScript so it shows each part of the equation step by step. Also an added tip would be to check on websites that have similar functions like Cymath

I will choose Canvas with HTML5 and Javascript to create the animations, the good point with Canvas is that you have full control of pixels, the cons is that you will have to deal with all the stuff to create and render every single function.

Related

Creating a simple "game" to collect data of mouse movement vs. latency [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm trying to create a very simple game on a website (HTML or Java whatever is easiest)
The game needs to have a moving square and the player needs to keep his cursor in the box
it will count time in the box (total and consecutive) and how many times you got out of the box
In the back end i need to be able to add latency from user action until the mouse cursor actually moves to show the impact of latency on the performance.
I also need to be able to collect and save this data with relation to the user entered info (can even be just an ID that he will type into a google form)
is there any existing code that i can use to create this?
I'm only interested in the data collection aspect not in the coding itself :)
any help would be greatly appreciated!
[Cannot comment jet so as an answer]
You could use Unity for the game programming. As far as i know it has a webbuilder. You will find a bunch of tutorials for this engine everywhere. Although nobody will build a game for you on this website ... -> Your question shouldn't be this vague but a concrete programming problem

Javascript Library to build drag and drop interface and connect elements with line [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 months ago.
Improve this question
I am looking for an approach or Javascript library that I can use to build a scientific modeling application. I suppose this is analogues to the way flowcharting software like Visio works. Add elements and connect them with click and drag.
I need to be able to define certain elements and add them to the "canvas" by selecting the element and dragging them onto the canvas.
When I click on an element I need to be able to set certain parameters for that element.
I also need to be able to connect one element to another by clicking on one and dragging a line to the second element.
I am looking for some advise on the best javascript library or approach to use. I will probably build the app in Vue.js as I have some experience using it.
Given a bit more complicated feature set, I've opted for mxgraph (the draw.io library). It's old, it's heavy, it's complicated, it's written in vanilla javascript, and to make it work with Vue you'll probably need to write the integration yourself. But it works, and there is light at the end of the tunnel.
Most important parts for me were: custom complex shape support (like, with groups, and "handles" - you know, these yellow dots you use to "adjust" some shape pieces in Visio for example), undo/redo, save/load, print.
joint.js ("rappid" now) may be my second bet if mxgraph won't cut it (not sure how it compares, but the feature list includes the items I needed)
There is also always an option to do it all with plain javascript; you have basic libraries like svg.js, snap.svg, etc that would allow that. moving shapes with drag-drop is no problem even with plain javascript. But in this case connector routing and undo/redo would be on you, and that's a bit harder.
If you find something better than these options please let me know!
btw, Visio Online does not support custom shapes at all now.

What is a good 2D grid-based path-finding algorithm? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm currently writing a 2D game in Javascript using the HTML5 <canvas> element. It's coming along very nicely, but i have run into a problem.
The level design for my game is a grid (so path cost moving from one cell to the north/south/east/west cell is 1) with various obstacles occupying various locations in the grid – a lot like a maze, but with a lot more wiggle room. Each individual level is on the order of 400 × 200 cells.
I'm trying to implement an enemy that will seek out the player no matter where they might be, but i'm having trouble trying to translate one of the various path-finding algorithms to fit my situation. Most of the ones i've come across (like A* and Dijkstra) seem to be best suited to 3D or much more complicated 2D situations. I was wondering if it is possible to dramatically simplify these algorithms to better suit my purposes, or if something like the depth-first search would be a more efficient alternative given the level size.
A* is a very common 2D pathfinding algorithm. It might take a little time to wrap your head around what's happening if pathfinding is unfamiliar, but it's not terribly complex. You may just be looking at someone else's example code that's been developed for a more complex application than you intend. There's a good tutorial for understanding the algorithm here.
Check this out https://github.com/qiao/PathFinding.js It has a lot of demos and path finding algothms.
EasyStar.js is a nice looking library that appears to do what you'd like to. I haven't used it myself, but the documentation on the project's github page looks pretty good, and it's probably what I would choose in your position.

JavaScripted Augmented Reality [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Does anyone have experience with a JavaScript library for Augmented Reality?
If so, can you recommend one?
EDIT:
Not sure how to better clarify this... By Augmented Reality I mean using device webcam (laptop, smartphone, tablet) and overlapping elements over the video feed on screen. Ofen, the overlapping is done based on a marker the algorithm searches for within each frame and makes calculations about its position in space.
Hope that's enough.
Thanks.
I think this is what you might be looking for. JSARToolkit is a direct port of Flash FLARToolkit from Ilmari Heikkinen. Great tutorial you may also want to check out and a link to the Git repo.
http://weblog.bocoup.com/javascript-augmented-reality/
https://github.com/kig/JSARToolKit
You can try skarf.js, a framework that I have created for handling JavaScript augmented reality libraries in Three.js.
It currently integrates JSARToolKit and js-aruco, so you can easily switch between these two libraries to decide on the more suitable one to use.
This framework takes care of a number of things for you, including automatic loading of models when the associated markers are detected (association is specified in a JSON file). There is also a GUI marker system which allows users to control settings using AR markers.
Integration with Three.js is just one line of code to create a Skarf instance and another line of code to update.
There are videos, live demos, source codes, examples and documentation available. Check out http://cg.skeelogy.com/skarfjs/ for more info.

Javascript 3d Graphing utility? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does any one know of any good javascript 3d graphing utility? I know that every site ever recommends Canvas 3d Graph but it is actually quite limiting. For one it only allows graphing with datasets that are within the 1000. Though it does have some capability (with a bit of code modifying) to graph data that are a bit out of its range, nothing out of a complete revamp will allow graphing of data based on time or with values hugely larger than 1000. (I have data values that range into the billions.)
Or should I abandon all hope and either write one myself or look to other technology?
Google O3D is a library for producing 3d-graphics using Javascript. It also has a deprecated plugin, but the newest version uses WebGL.
Check it out here: http://code.google.com/p/o3d/
You'll definitely need to build a small graphing-shell around it, but it shouldn't be hard, especially not if you look closely to the examples provided on the Google-code website.
It uses OpenGL as a backend-technology: rendering lots of polygons, on reasonable hardware, is not a problem at all.

Categories