A quick and dirty way to fix that last vertex problem is for the last vertex,instead of using Perlin noise,use average of 2nd last vertex and first vertex as radius,this will make it smoother
fantastic series, super interesting. really well presented too. clever that they are punctuated and content dense as opposed to slow and condescendingly redundant explanation. i watch these for entertainment.
There is a sharp change in between the beginning and end of the shape partly because that angle would be only 0.0831... ect. The rest of your angles where 0.1 radians. This means that is has less space to strech the change over making it a bit more sharp. Two pi is not a decimal terminating in the 10ths place, so you would have to make your increment in your loop that draws the circle in terms of pi. Try pi/31.5 to be your increment. You would have just as many slices in the blob, but they would be more evenly spaced out. I do not know if this would solve the problem, but it is most likely one of the factors causing the problem.
for (float a = 0; a < TWO_PI-PI/30; a += 2*PI/30) { This seems to provide some improvement, though it remains aesthetically unappealing. I also CLOSE the endShape.
idea for looping noise: take 1d noise values based on information from a circle of points in a 2d noise function, could be expanded to looping 2d noise with a torus so like... non euclidean noise?
think it could be intresting to have the edge of the circle be perlin noise, but make it 3 dimensional with time being the 3rd dimension like you did in the perlinn noise video with the vetor field. This way the wobble would be continous and somewhat random, could be cool to look at too and if you add for example a sound curve of music to it it might look intrsting too :D
If you made the noise a function of vertex x and y then the first and last points, being similar, would get a similar offset and close better. -- How would you make it more of a smooth spline through the vertices with no sharp bends? No piece-wise linear fit?
3d perlin with something like: noise(r*cos(a), r*sin(a), t); where r is an adjustable constant for smoothness, and a is the angle of the current circumference point, and t is just an updating time value
+orazdow i have yet to try this, but use 3d perline noise, using one dimension for time, and two dimensions to specify the point on the circumference ur trying to find a value for. something like: noise(r*cos(a),r*sin(a),t); where r is just a constant u can slide up or down based on how smooth u want the noise differences to be. Imagine u are drawing a circle in a 2d perlin world, the noise values on the circumference shud be continuous, we only add the third dimension for time. also, the r constant doesn't hav to be ur actual radius, it's only to help u adjust the smoothness
That would be continuous but it would be also symmetrical about x-axis and y-axis. One way to get rid of the discontinuity is to use curveVertex instead of vertex and repeat the 3 first points. p5ide.herokuapp.com/editor#?sketch=57d42c833b7b6903001548b9
That's not a bad solution i like it, but it doesn't get rid of the discontinuity between noise(0,t) and noise(2*PI,t), it only covers it up by curving the sides (most significantly curving the last side). Again, that's completely reasonable, but I don't think my idea is wrong, but maybe i conveyed it wrong. I'm saying instead of noise(angle,t); use noise(constant*cos(angle), constant*sin(angle), t); This way, as angle goes from 0 to 2*PI, the noise function works it's way back to where it started from. There is literally no discontinuity this way, where as in the other way the discontinuity was simply curved over. Am i making sense?
and idk what you are talking about with symmetrical sides, that's not how sin and cos work. the noise function will vary throughout the circumference but it will work it's way back to the noise value of the angle 0 bc cos(0)==cos(2*PI) and same for sin
You're right, if you look at the noise values, the discontinuity still exists (and it will be visible depending on the parameters used), it's curving the edges to make the curve smooth. The problem is not how sin and cos work, but how noise works: noise(n) == noise(-n). Here an implementation of your idea: p5ide.herokuapp.com/editor#?sketch=57d458e33b7b6903001548c0
Hey,buddies, I am really a programming beginner, and I followed alone with this video on my own processing,something I did here seems wrong. Please can anyone help me to figure it out? I would be super grateful.
Here is my code, Thanks so much void setup(){ smooth(); size(800,800); } void draw(){ background(255); pushMatrix(); translate(width/2,height/2); beginShape(); float xoff=0; for(float a=0; a
You have to make a sphere with beginshape and endshape first. A little bit of 3d trig intuition is necessary, you can think of points on the surface of the sphere as being defined in polar coordinates as a radius, an angle around the y axis, and an angle around the z prime axis (z prime is the new z axis after it has been rotated around the y axis by the first angle) . Using this, you can have a loop that iterates every possible z prime angle inside a loop that iterates every possible y angle. So each iteration of the y loop (the outer loop), represents a line of points from pole to pole on the sphere. What you can do then is draw a new triangle strip each iteration of the outer loop by using the line of points at the current y angle and the line of points at the next increment of the y angle. I'm hoping you know how to make triangle strips w beginshape. The only problem left is to figure out how to convert the polar coordinates of a radius and two angles into rectangular coordinates when u finally have to use the vertex() call. Unfortunately you can't use rotate() and translate() between beginshape and endshape, that's why you have to convert instead of letting the matrix transforms do all the work. But going from a radius to two angles isn't too bad, it's an interesting trig problem to solve out, let me know if you're having trouble with that, and also let me know if I'm not making sense with anything I've said so far, I'm sort of sleepy hahahaah