VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

B-Spline

Federico Rahal  (1 Submission)   Custom Controls/Forms/Menus   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Draws a B-Spline over a PictureBox while the user inputs a series of points with the mouse.
It also allows to drag the Control Points of the B-Spline to modify it

Assumes
'Create a new project, Project1 is created by default 'Add a new module and name it modSpline ' 'Change the name of Form1 to frmSpline 'Add a PictureBox, this is where you are going to draw the Spline 'Change the following properties of Picture1: ' Name= picDraw ' ScaleMode = 3 'Pixels ' BackColor = vbWhite 'Add also the following ' Two Option Buttons: ' OpMode(0) and OpMode(1) ' Opmode(0).Caption = "Move" ' Opmode(1).Caption = "Draw" ' 'Add One Command Button named cmdClear ' Caption = "Clear" 'Add Three Labels 'Label1: ' Name=lblT ' Caption="Degree T" 'Label2: ' Name=lblRes ' Caption="Resolution" 'Label3: ' Name=lblLen ' Caption="Spline Length" 'Inside the pictureBox add one label: ' Name=lblGrip ' Index = 0 'Very important ' BackColor = vbRed ' Height = 3 ' Width = 3 ' Visible = False 'Add a ComboBox ' Name=cboDegree ' Style = 2 'DropDownList 'Add a TextBox Named txtRes: ' Text ="5" ' 'Add a menu ' Edit mnuEdit 'and a subitem Delete mnuDelete 'Set the visible property of mnuEdit to False '

Returns
'Returns the Outp() array filled with the points along the b-Spline

Rate B-Spline (6(6 Vote))
B-Spline.bas

B-Spline Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters