-
Recent Posts
Recent Comments
- R.P. Churchill on TWSL Series 07: Discovery and Data Collection
- R.P. Churchill on A Simulationist’s Framework for Business Analysis: Round Two
- LN on A Simulationist’s Framework for Business Analysis: Round Two
- R.P. Churchill on Starting to Learn About the Java Memory Model
- R.P. Churchill on Multidimensional Arrays in Javascript
Categories
Meta
October 2025 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Tag Archives: JavaScript
Turning the Graph Function Into an Object in JavaScript, Part 6
Here is a diagram of all the measurements needed to place items in the graphing area. Given the width and height of the canvas element in pixels you can see how every element is placed building in from the outer … Continue reading
Turning the Graph Function Into an Object in JavaScript, Part 5
Today’s goal was to come up with a reasonably automated way to specify formatting for the numeric values associated with the major tickmarks on each axis. I chose to implement settings for decimal places, overall precision width, and whether or … Continue reading
Turning the Graph Function Into an Object in JavaScript, Part 4
Picking up from last week I’ve finished turning the JavaScript graphing widget into an object, the results of which are shown below. There is a long list of TODOs included in the code that is not close to being exhaustive; … Continue reading
Turning the Graph Function Into an Object in JavaScript, Part 3
Today I’ll describe the sizing of characters so the graph object knows exactly how to place them. I hacked together a tool that prints out letters in a specified font and then draws horizontal lines at various offsets from the … Continue reading
Turning the Graph Function Into an Object in JavaScript, Part 2
In drawing a graph I’ve created variables for all sorts of coordinates (where do the axes begin and end?) and characteristics (how many tickmarks per interval, how long are they, and what color?). However, rather than define the locations directly … Continue reading
Reverse Engineering Or… What Was It I Was Trying To Do There?
While continuing the process of turning the JavaScript graph widget into an object I found I needed to create labels of various kinds, which you see added in the examples below. I also wanted to test out some more of … Continue reading
Posted in Tools and methods
Tagged curve fitting, graph project, JavaScript, simulation, thermodynamics
Leave a comment
Turning the Graph Function Into an Object in JavaScript, Part 1
Sometimes it is simple enough to build an object from the ground up in a slow, methodical, organized fashion. By contrast, one may also choose to hack something together to get it to work, play with it, and then refine … Continue reading
HTML5 Canvas Issue: Line Caps
I learned basic computer graphics in college and wrote my first programs on an original IBM PC with a Hercules graphics card. I remember that if you specified a start and end pixel that both of those pixels, along with … Continue reading
HTML5 Canvas Issue: Half-Pixel Offset
One of the issues I encountered when working with the HTML5 canvas element was the issue of pixel alignment. I made sure that the only size definition was given in the HTML declaration for the image itself as in:
1 |
<canvas id="myCanvas" height="160px" width="160px">The HTML5 Canvas object is not supported on your browser.</canvas> |
Javascript HTML5 Canvas Pour Demo
When Bricmont was purchased by Inductotherm in 1996 I was charged with maintaining the product Inductotherm used to control its induction melting furnaces. During a lull some time later I worked up a little demo program in Delphi that could … Continue reading