Eisenscript ‘build’

The current project is a WebGL implementation of the eisenscript language. See documented progress on the dedicated page.

Current live

This page will serve as a todo list:

  • render in iframe
  • update iframe based on code entered
  • code highlighting
  • primitives in eisenscript rendered in three.js
  • eisenscript transformations preformed in three.js
  • local transformations
  • eisenscript lines
    • primitives: box, sphere, wireframe
    • single transform group
    • multiple transform group
  • eisenscript rules
    • rule order determined
  • beginner interactive tutorial to eisenscript
  • save and share scripts
  • share creations, watermarked/linked

eisenscript part 2

reverse engineering eisenscript, it’s the process. I am interested in parent-child relationships because that seems to be the way to get three.js to simply render the objects.

two transformations:

X first then RZ

in the x direction and then rotated

when there is two transformation sets it is the same

the box is transformed once in the x direction and then three times it is rotated

the box is moved three times in the x direction and rotated once

this acts the same as a rule if it is the the same order

RZ first then X

same

Eisenscript

“EisenScript is a programming language designed by Mikael Hvidtfeldt for generating 3d structures. This language shows you that even a simple system has a big possibility to generate surprising and complex structures, and then brings a big amazing to you.”

I tried modelling with this in structure synth and it’s great. My output did tweaking with MeshLab

 

Removing interior model faces:

1. Filters > Color Creation and Processing > Ambient Occlusion. Then applying default values worked for me.
2. Filters > Selection > Select by Vertex Quality. The small picture gave me some hint, Min quality: 0 Max quality: 0.1, the preview checkbox shows what you will select in red while you adjust.
3. Filters > Selection > Delete Selected Faces and Vertices.

Water detector

Water absence alarm.

Ingenuity from laziness, sounds like it could be protecting from huge amounts of water damage, and it could be. But, my dogs water runs low for an hour or two before we notice- perfect simple IoT project.

I built it. My dog water bowl sends an sms when it needs to be filled. I plan to make a proper guide. Used the Particle with power shield, and a IFTTT trigger to send an SMS. Very low power.

Archive of earlier ideas, possibly future work:

To detect absence of water, I’m thinking two wires that form a switch to ground, normally closed and you’d read 0 when there isn’t water you’d read 1, connected to an interrupt that can wake from sleep. How about a capacitive liquid level sensor, like the one I’d imagine is in the Pryme?

I’ll have to play with web hooks and see what integration will work, ideally something that alerts my phone. This could lead to integration to other things.

After a working prototype, there would be an effort to design something nice. The components I’ll use will be small already. How long power is provided should be alright with the interrupt, maybe instead of LiPo, I’ll use 4x 1.2V Eneloop batteries that would probably last longer and be safer.

This would be a good project for the Oaks I haven’t used. I got them not really knowing much, but know I know they were an early (at least when I got them) ESP8266 board. I’ve already worked with other Particle stuff so they use the same web IDE I’m used to.

Calibration

% error of curves.

Resources: overviewworksheets, linear least squares, linear interpolation.

When you have a few data points from a sensor, I haven’t found an easy way to calibrate. There are linear, quadratic, cubic, logarithmic curves.

It could be you enter data or draw how you want the curve to act, adding more control points if needed. It would output the equation if drawn, or different equations with the calculated error from the data given. Speed v accuracy being the trade off.

So much wasted time in Math. There should be a math test for people 5 years after they graduate high school. When the results are back you can pay me to consult how to improve it, part of the problem will be what you test on- that advice is free.

Starting point is linear with two points.

Equations: m = (y2- y1) / (x2 – x1) and with a point, y – y1 = m(x – x1)

In my case color sensor I wanted 1505 to output 0, and 361 to output 255.
m = (255-0) / (361-1505) = -0.223
coefficient = 255 / min-max

y – 0 = -0.223(x -1505) => y = -0.223+ 335
intercept = coefficient * -max

You can enter (1505,0)(361,255) into Wolfram and get an exact answer, Wolfram language may be a way to solve complex problems.