Formula finder - Printable Version +- Forums - Open Redstone Engineers (https://forum.openredstone.org) +-- Forum: Off-Topic (https://forum.openredstone.org/forum-4.html) +--- Forum: Programming (https://forum.openredstone.org/forum-8.html) +--- Thread: Formula finder (/thread-2336.html) |
Formula finder - David - 02-06-2014 Hello! When I was bored today I was like, let's see if I can understand Bresenhams line drawing algorithm! NOPE! Just to up my ego and feel very smart a made something in java. If you give this program two points it'll return a linear formula calculated with the two points it's been given. Code: package david.main; If you were to input for example: "3,10" and "5,2", it'll return "y = -4.0x + 22.0". That is the line where both 3,10 and 5,2 are on. It should be pretty easy to figure out how I did this. If you don't understand this (which I highly doubt) I can create a vid to explain it. -David RE: Formula finder - Iceglade - 02-06-2014 That beautiful code :O RE: Formula finder - VirtualPineapple - 02-07-2014 Now find the piecewise function of a quadratic spline interpolation with the inputs being multiple points >:3 RE: Formula finder - David - 02-07-2014 (02-06-2014, 11:51 PM)Iceglade Wrote: That beautiful code :O Was that sarcastic? RE: Formula finder - Iceglade - 02-08-2014 No, I can't write java for crap xD RE: Formula finder - David - 02-08-2014 (02-08-2014, 12:33 PM)Iceglade Wrote: No, I can't write java for crap xD It's pretty easy really, but xeo would kill me if I said I like java, so even though I like it I'm not going to tell anybody. RE: Formula finder - Iceglade - 02-08-2014 >post on ORE forums >not going to tell anybody >...? XD RE: Formula finder - David - 02-08-2014 (02-08-2014, 01:44 PM)Iceglade Wrote: >post on ORE forums Because that's how I roll! RE: Formula finder - VirtualPineapple - 02-09-2014 sosneaky RE: Formula finder - David - 02-09-2014 (02-09-2014, 04:09 AM)VirtualPineapple Wrote: sosneaky ikr |