So far the car moves (cursor up and down) and the tires turn (cursor left and right)
But I don't know how to apply the angle of my wheel
car.wheelAngle to the cars movement?
Any hints? Important parts are bold in the code below.
At the moment, I apply the cars gobal angle
car.angleCar (compared to north (or east)) to its movement but I don't know how to integrate
car.wheelAngle into this.
// the car itself
float xpos;
float ypos;
float w, h;
float xspeed;
//float yspeed;
color c;
float angleCar=12;
// 4 tires
float tireOffsetX, tireOffsetY; // position as offset from car center
float tireW, tireH; // size
float L = tireOffsetX*2; // the dist between tires front and rear
// wheel
//PImage imgWheel;
float wheelAngle = 0;
how can I check if a certain string A is in a file and if so, load the entire line (that contains A but is longer than A)?
Context: the file contains string and many many lines. I want to check if part of one line exists and if so, load the entire line.
Greetings, Chrisir
If you need an answer, please send me a personal message since this forum doesn't notify.
Hello all, I have an array of boolean, 30 or 50 elements. how can I convert it to an int or bit array and store vast numbers of this array on my hard drive?
Edited: I have many (~1 million) different arrays of boolean, 30 or 50 elements. Can I store those arrays (with each 30-50 bits) in one file?
in my mp3-player I'm working on a mini-file-browser (mini windows explorer).
So my question is, how can I detect the current drives in
the system (Win 7)?
I am doing some crazy math stuff and just wanted to ask when I have a 4D-point (or point cloud), how I can convert it into 3D? It's like a projection from 4D space into 3D space. We talking Euklid here not Einstein of course.
I looked at curveVertex where I can add many points but there is no
curvePoint for this to read the points afterwards and put them into the camera.
Or is there?
But I didn't find a way to get one single path instead of a tube.
A path I could read out and give into camera.
Any ideas?
FInally I thought of making a class CameraData and store the 6 camera
positions and then make an ArrayList of it and store the points into it
the camera has to fly to. But I realized it would look uncool because
with fixed points, the camera would fly with rough angles.
So my questions are:
Any ideas?
If I stick to the idea of class CameraData, how would I smooth out the movement? Or use damping here?
I wondered if there's a local menu in processing that I can program using controlP5.
You know, when I right click with the mouse e.g. on an rect a menu that says "change color", "change size" etc.
Much simpler than in the image below of course.
I am still thinking about a marble machine with tracks for marbles.
With a marble rolling down in 3D construct.
There is a system made of wood that I would like to program in processing:
http://www.cuboro.ch/de/Info/Produkte (there seems to be an elevator system for the marbles they are proud of)
There are wooden blocks with tracks upon it, but also blocks with tunnels in it, even
blocks with 90° curves in or upon it.
When I program it, I want to run a marble through it, not as a proper physics engine but as data structure
that knows, where is the cube and where is/are its entry point(s) and exit point(s), so the marble can pretend to follow the right path and fall where it should etc.
I am not sure how to make a class for it.
I could have an ArrayList of all cubes and its pos, its type and its rotation.
There are I think 9 basic types like
straight tunnel with straight track upon it (both same direction)
straight tunnel with straight track upon it (90° to each other)
straight tunnel with curve to the left upon it,
straight tunnel with curve to the right upon it,
crossing of two tracks upon it (+) and tunnel leading in on the side, coming out of the button ( \ )
etc.
How can I make my class so, that the rolling marble comes into the block, knows its new direction and in which cubes it goes next and from which of its sides? This must be some kind of a rule set.
How can I make connections between two tracks / cubes?
Later the marble machine could be shown visually 3D with the rolling marble, camera follwoing it, marble making noises when rolling or falling.
Later still there could be a visual editor to make and save your own marble machines.
Thanks for any thoughts on that data structure thing!