15,179,476 members
Home / Discussions / Algorithms

# Algorithms

 Reduce a Q2SAT formula Apurvgupta15-Jun-14 21:48 Apurvgupta 15-Jun-14 21:48
 Fastest textual decompression in C Sanmayce10-May-14 9:54 Sanmayce 10-May-14 9:54
 Re: Fastest textual decompression in C Richard MacCutchan10-May-14 22:46 Richard MacCutchan 10-May-14 22:46
 Re: Fastest textual decompression in C Sanmayce12-May-14 1:18 Sanmayce 12-May-14 1:18
 Re: Fastest textual decompression in C Richard MacCutchan12-May-14 2:24 Richard MacCutchan 12-May-14 2:24
 Re: Fastest textual decompression in C Chris Losinger23-May-14 4:12 Chris Losinger 23-May-14 4:12
 Re: Fastest textual decompression in C Sanmayce24-May-14 8:17 Sanmayce 24-May-14 8:17
 The Bessel-Overhauser Spline interpolation - suitable values for the weight function Kenneth Haugland4-Apr-14 0:34 Kenneth Haugland 4-Apr-14 0:34
 The formula that I'm using to create this is from the book "Mathematical tools in computer graphics with C# implementation", however it only had the formula and no code. You could find the same kind of formulations available online here[^], and skipback and forwards on the slides to see a bit more. My Implementation looks like this: VBCopy Code ```''' ''' The Bessel-Overhauser Spline interpolation ''' ''' First point ''' Second point ''' Third point ''' Forth point ''' ''' The value from 0 - 1 where 0 is the start of the curve (globally) and 1 is the end of the curve (globally) ''' ''' Public Function PointOnBesselOverhauserCurve(ByVal p0 As System.Windows.Point, ByVal p1 As System.Windows.Point, ByVal p2 As System.Windows.Point, ByVal p3 As System.Windows.Point, ByVal t() As Double, ByVal u As Double) As System.Windows.Point Dim result As New System.Windows.Point() Dim ViXPlusHalf, VixMinusHalf, ViYPlusHalf, ViYMinusHalf, ViX, ViY As Double ViXPlusHalf = (p2.X - p1.X) / (t(2) - t(1)) VixMinusHalf = (p1.X - p0.X) / (t(1) - t(0)) ViYPlusHalf = (p2.Y - p1.Y) / (t(2) - t(1)) ViYMinusHalf = (p1.Y - p0.Y) / (t(1) - t(0)) ViX = ((t(2) - t(1)) * VixMinusHalf + (t(1) - t(0)) * ViXPlusHalf) / (t(2) - t(0)) ViY = ((t(2) - t(1)) * ViYMinusHalf + (t(1) - t(0)) * ViYPlusHalf) / (t(2) - t(0)) ' Location of Controlpoints Dim PointList As New PointCollection PointList.Add(p1) PointList.Add(New Point(p1.X + (1 / 3) * (t(2) - t(1)) * ViX, p1.Y + (1 / 3) * (t(2) - t(1)) * ViY)) ViXPlusHalf = (p3.X - p2.X) / (t(3) - t(2)) VixMinusHalf = (p2.X - p1.X) / (t(2) - t(1)) ViYPlusHalf = (p3.Y - p2.Y) / (t(3) - t(2)) ViYMinusHalf = (p2.Y - p1.Y) / (t(2) - t(1)) ViX = ((t(3) - t(2)) * VixMinusHalf + (t(2) - t(1)) * ViXPlusHalf) / (t(3) - t(1)) ViY = ((t(3) - t(2)) * ViYMinusHalf + (t(2) - t(1)) * ViYPlusHalf) / (t(3) - t(1)) PointList.Add(New Point(p2.X - (1 / 3) * (t(3) - t(2)) * ViX, p2.Y - (1 / 3) * (t(3) - t(2)) * ViY)) PointList.Add(p2) ' Get the calcualted value from the 3rd degree Bezier curve Return PointBezierFunction(PointList, u) End Function``` I assumed that t(), and array of equal length to the number of points, would be the same in both X and Y directions. Now, how should adjust my t() values, and should they be dependent on the values X and Y, meaning that they have one value for X and one value for Y? And, is the implementation correct?
 Re: The Bessel-Overhauser Spline interpolation - suitable values for the weight function Kenneth Haugland6-Apr-14 1:30 Kenneth Haugland 6-Apr-14 1:30
 Factoring algorithm Member 41945931-Apr-14 5:46 Member 4194593 1-Apr-14 5:46
 Re: Factoring algorithm Bernhard Hiller1-Apr-14 21:44 Bernhard Hiller 1-Apr-14 21:44
 Re: Factoring algorithm Member 41945932-Apr-14 7:17 Member 4194593 2-Apr-14 7:17
 Re: Factoring algorithm Kornfeld Eliyahu Peter2-Apr-14 10:30 Kornfeld Eliyahu Peter 2-Apr-14 10:30
 Re: Factoring algorithm Peter_in_278023-May-14 16:34 Peter_in_2780 23-May-14 16:34
 Re: Factoring algorithm Member 419459323-May-14 18:03 Member 4194593 23-May-14 18:03
 Team Contract Algorithm Laurence Senna27-Mar-14 21:23 Laurence Senna 27-Mar-14 21:23
 Re: Team Contract Algorithm Richard MacCutchan28-Mar-14 1:22 Richard MacCutchan 28-Mar-14 1:22
 Detecting File Changes Richard Andrew x6427-Mar-14 14:44 Richard Andrew x64 27-Mar-14 14:44
 Re: Detecting File Changes Richard MacCutchan27-Mar-14 23:19 Richard MacCutchan 27-Mar-14 23:19
 Re: Detecting File Changes Matt T Heffron28-Mar-14 8:22 Matt T Heffron 28-Mar-14 8:22
 Re: Detecting File Changes Richard MacCutchan28-Mar-14 9:04 Richard MacCutchan 28-Mar-14 9:04
 How much is my encryption algorithm worth? Daniel Mullarkey22-Mar-14 21:47 Daniel Mullarkey 22-Mar-14 21:47
 Re: How much is my encryption algorithm worth? Kornfeld Eliyahu Peter22-Mar-14 22:19 Kornfeld Eliyahu Peter 22-Mar-14 22:19
 Re: How much is my encryption algorithm worth? Richard MacCutchan22-Mar-14 23:10 Richard MacCutchan 22-Mar-14 23:10
 Re: How much is my encryption algorithm worth? Daniel Mullarkey23-Mar-14 4:34 Daniel Mullarkey 23-Mar-14 4:34
 Last Visit: 31-Dec-99 19:00     Last Update: 27-Jan-22 11:44 Refresh ᐊ Prev1...48495051525354555657 Next ᐅ