Author Topic: Equation generating  (Read 4652 times)

0 Members and 1 Guest are viewing this topic.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Equation generating
« on: March 03, 2011, 11:31:19 pm »
I want to create an equation that works kindof like the sin/cos function but has irregular zeros. It needs to have maximums of 1 and minimums of -1. How would I do this? Thank you for any help.
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Equation generating
« Reply #1 on: March 03, 2011, 11:34:17 pm »
Sin(x2) or Cos(x2) should work. If you need something less predictable, may I recommend 2Rand-1?
« Last Edit: March 03, 2011, 11:35:41 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Equation generating
« Reply #2 on: March 03, 2011, 11:41:43 pm »
i already have specified values for all zeros. I just need to control how the graph acts in between them
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Equation generating
« Reply #3 on: March 03, 2011, 11:48:50 pm »
Oh, that's a very different question from what I was answering. However, I can tell you right off the bat that if you have more than about 5 irregular zeros, you're not going to be able to compute one of the equations very quickly. I'd recommend that you read up on Interpolation and especially Polynomial Interpolation to figure out the equation. It depends on how irregular your data points truly are, but your function will probably have a degree on the order of N-1, where N is the number of data points.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Equation generating
« Reply #4 on: March 28, 2011, 06:41:38 am »
If they're really THAT irregular you can always use a data-smoothing algorithm such as a uniform b-spline.
« Last Edit: March 28, 2011, 06:41:53 am by ZippyDee »
There's something about Tuesday...


Pushpins 'n' stuff...


Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Equation generating
« Reply #5 on: March 28, 2011, 06:56:31 am »
I think the point is to have a random function, not a smooth one ;)
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Equation generating
« Reply #6 on: March 28, 2011, 07:09:44 am »
I want to create an equation that works kindof like the sin/cos function
[/quote
This made me think of curves. That made me think of b-splines.
There's something about Tuesday...


Pushpins 'n' stuff...