Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

How To Convert A Certain Point Coordinate To Use

How to convert a certain point coordinate to use
in an API Function in Picture Box whoes coordinate is
set as user coordinate.

Pls find a sample code to explain the problem

Coordinate system is changes to Bottom to Top (0 to Y)

In which the Line,Circle methods shows correct drawing
and MoveToEx, LineTo needs modification in the values
to keep the same drawing as Line method in PictureBox
So I need to know that code for modificaion of Point

(Actually I need to use API function to make filled Irregular Polygon Shapes
along with other codes for lines,arcs using Line,Circle Methods in PictureBox )

Please Find Attachment code.

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Point/Coordinate Along Circumference Of Circle
I have been looking for a formula so that I may be able to find a point along the outside of a circle based off of the coordinates for the center of the circle, the radius of the circle, and the degree of the angle; for example 90 degrees would be straight up and 45 degrees would be up right.
I am working on a line drawing application and I am trying to rotate the line. I am using the mid point of that line as the center of the circle and the chosen degrees to rotate as the degree or angle of the portion of the circle.

If this doesn't make since, please let me know.


Convert Comma To Point
When i save my variables to text all point convert to comma. Like below

if i save it to text
Print #1, Var1

it's look like 2,2 in text.

I rearange regional settings thus my problem fixed but wonder how can i save my data with point without make any changement on regional settings.

Convert An Inch Into A Point
How can I convert an inch or centimetr ... into a point (pixel) in VB 6.0.

Thanks, Boris.

Convert Hexadecimal To Floating Point
Call me an idiot, but for the life in me i cannot figure out how to do a simple conversion......
I need to convert
FB7E0E41 to 8.9060
32 bit IEEE Hex to decimal
can ANYONE Help ME!!!!!

Nick Stone

Convert Bytes To IEEE-754 Floating Point
I have 4 ordered bytes values (0-255) which I receive from a device's output. These 4 bytes represent a 32bit floating point value in IEEE-754 format. I need a VB6 function which converts the 4 bytes into this value. Thanks in advance.

Convert A String With A Decimal Point To A Value *RESOLVED*
I've done the usual search, but just can't seem to find an answer for this.

I've just read in a string, lets say PI -> "3.14159" and now I want to convert this to a value to use in calculating something in the program.

Interval = Val("3.14159") just returns the rounded integer portion of the number. How do I get the whole value including the numbers after the decimal point?

Edit: It helps to declare Interval as Double rather than Long !

Convert Floating Point Array To Byte Array In C
Right, i think what i need to do is convert a floating point array into a byte array so that my VB program can understand it....

How do i do this in C?


How Do You Convert Whole Numbers To Decimal Point Numbers?
I have this code and it adds 9+9 then divides by 4 which = 4.5 and places it in a text box, but it dosn't show the 5 after the point.

Code:a = 9: b = 9
 text(8).text = a+b
 text(8).text = text(8).text 4
 text(8).text = Format(text(8).text, "#.##")

Whats wrong here?

Bob K

Edited by - Bob K on 3/17/2005 7:17:06 PM

Confused Math: Rotating Point Around Point By Radius
Sup guys, I've been working this function for 3 days now and what I've got is completley useless... Please help me... going on day 4...

I am tring to rotate an image around a predefined X,Y coord at a certain distance(radius) away depening on the mouse position.

IE: If mouse is NW of coord X,Y then my images is displayed on the NW circumferance around my X,Y coord, freely moving around the circumfrence as I drag the mouse around the form.

I didnt realize the difficulty in doing this untill I set my hand at it and was wondering if anyone could help me figure this out so I can get some sleep sometime this week ;p Here is what I have and might I say I've tinkered with it for hours and I know it is completley wrong.

I have 1 picture box on form

Dim pX, pY, Radius As Integer
Dim PI As Long
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
PI = 3.1415926535

'Point to Rotate around (Center of Window)
pX = Me.ScaleWidth / 2
pY = Me.ScaleHeight / 2

'Distance away from point for picture to ride along
Radius = 50

'Problems start here
Picture1.Top = (Y * Cos(0) - X * Sin(0)) + (PI * pY Radius ^ 2)
Picture1.Left = (X * Cos(0) - Y * Sin(0)) + (PI * pX Radius ^ 2)

End Sub

Is It Possible To Extract Data From Point A To Point B In A Report (txt File)

I have a report that some one has given me but the only section i want is half way down and never in the same place and the same size.

whats the best way to extract this section to a new file.

if anyone can supply some code i would appeciate it

Find Resulting Point By Given Point, Angle And Distance
I need someone with a descent understanding of math to help me out with this little problem.

Given an origin coordinate, angle and distance, calculate the resulting point's x,y

So far I have the following:

Public Type Point
X As Integer
Y As Integer
End Type

Function Get_Point(ByRef ptOrigin As Point, ByVal angle As Integer, ByVal distance As Integer) As Point

'Do math stuff here

Get_Point.X = resultingX
Get_Point.Y = resultingY

End Function

Any help is much appreciated

Extracting Strings From Point A To The Unknown Of Point X
hi there.

i forgot how to, but how do i extract strings from a txt box? I mean, i need to get rid of the first char of every value in that txt box and then extract EVERYTHING AFTER the first char, but how do i do it if I don't even know how many characters will be in that txtbox when extracting?

so if we have


how can I extract everything after the first char to the very last, unknown, char?


On Xy Scatter Graph If X Point Is Given How To Find Corresponding Y Point
to find Y point if given X point on a graph
I have a problem in which I have few X & Y points and using the relation between the points is it possible to find corresponding Y point if any X is given. . Is it possible by MSChart control if yes then tell the procedure and if not kindly help with the right solution.
The solution may be graphical or nay other.
The relation between X & Y can be linear or non-linear. So kindly help for both the ways.
Mahesh pareek


Making A Line Graph 1 Point Instead Of 2 Point???

I have a line graph which appears in 2 point. The MSChart property pages are of no help in making this line 1 point(as the line is created by code) so how can I code it?


Passing Data From Point A To Point B
I have a question....
Let's say I have an ActiveX object, called cCharge. This object will be called from two other places (ActiveX controls) called ctlA and ctlB.... cCharge has only two public functions. Both of these functions will be called from both places, and with nearly the same parameters. When it's called from ctlA, there will be some additional data that will get passed. This data will not be passed by ctlB.
I'm trying to determine what format would be best for sending the data from the control to the DLL....
The data consists of three parts... an ID (long) a name (string) and a value (double)... and there could be one or more of these (but there will always be the three parts together.)
I thought about a UDF, but then the UDF would need to be public to be seen by both....
I thought about XML, but then there's the overhead of the XML DOM.
There's also a recordset....
Or a variant multi-dimentional array.....

Any ideas?


Getting The Start Point And End Point Of A String

I want to know if this is possible and how.

I have code like this:

Picture1.print "This text changes! " & theword("anything")
end sub


theword is a function
"anything" can be, well, any string whatsoever - not just "anything"!

What I want my function to do is return, in my picturebox, the starting point of the string and the endpoint of "anything".

Here's what I have at present, but all it does is give the length of the string, which isn't good enough.

Thanks for any help!

Private Sub Command1_Click()

Picture1.Print "This text changes!! " & theword("anything")
End Sub

Function theword(x As String)

Dim start_point As Integer
start_point = Picture1.TextWidth(x)
Picture1.Print start_point
theword = x

Simple 3D!! - - - - Converting A 3D (X,Y,Z) Point To A 2D (X,Y) Point
Ok I on this WebPage It explains how to convert A 3D point (X,Y,Z) to a 2D point (X,Y)
I tried messing around with it and couldn't really get it working verry well, I just wanted to see if I could create and rotate a simple cube, but it doesn't seem to come out right, If anyone can figure this out, or have there own code that can do this I would like to see it

well thanks, I'll keep messing around with it

Edited by - Zman on 12/21/2003 8:35:03 PM

Draw A Line From Point A To Point B
Sound easy about that I need to do it on coordinate plane where X-axis is 50 and Y-axis is 50 (i thought about using my form's X and Y, but scale them so that if A (5;6) then it will display a point on form maybe....A(500;600) or whatever, but what formula can I use to scale that....i tried lots of stuff...none works.....basically all I need is to draw a line from A to B and use my form as coordinate plane, but scale it so that x = 5 and x = 10 have a visible difference....if i plug those Xs onto my form right now, then x = 5 and x = 30 don't have any visible difference at all (line will move maybe like a fraction of a milimeter (less then a 1/16 of an inch), but I need is that if x = 5 and x = 6 then it has difference about 5 milimeters on the form (line will move like 5 mm so that change in position of a line will be visible)
I hope that won't confuse you........Thank You

Makeing A "Time That Passes From Point 2 Point" Program With The 00:00:00 Format.
Hello i am trying to make a little progi that just gives me the time passes from one time to anouter This is how i am doing this :
Makeing one time with the old velue [OldV = timer] after about 15 secondes i make the new velue [Newv = timer ]
total = abs(newv -oldv)
TP = (Format(CStr(Int((Total / 60) / 60) & Int(Total / 60) & Tot Mod 60), "00:00:00"))
print tp
'this will print the time passed in the ##:##:## format and to reconvert it i use :
TSec = Int(((Hour(TP)* 60) * 60) + Int((Minute(TP)* 60)) + Int(Second(TP))
But there is something wrong with the code becuse i am have truble with it Please help if you can , thank you ...

How To Set A Picture At Exactly The Coordinate I Want
I am doing a program that requires me to move the icon to a specific position on screeen. As I had done so for the mouse cursor,
X = (Screen.Width / Screen.TwipsPerPixelX) / 2
Y = (Screen.Height / Screen.TwipsPerPixelY) / 2
SetCursorPos X, Y

I hope to do the same thing for the icon, I tried using the
Picture Left = (Screen.Width / Screen.TwipsPerPixelX) / 2
Picture.Top = (Screen.Height / Screen.TwipsPerPixelY) / 2
but it dose not set it correctly

I have no idea how to go about doing it, can someone please advise me on the method, thanks alot

Texture Coordinate
Hi every one
Please Take a look at this picture (_decor_6.JPG)
But When I am going to render it renders with wrong coordinate
and look like (_decor_62.JPG)

My vertices are :

Dim TriStripp(0 To 3) As TLVERTEX 'This square
TriStripp(1) = CreateTLVertex(328, 200, 0, 1, &HFFFFFF, 0, 1, 0)
TriStripp(0) = CreateTLVertex(200, 200, 0, 1, &HFFFFFF, 0, 0, 0)
TriStripp(2) = CreateTLVertex(200, 456, 0, 1, &HFFFFFF, 0, 0, 1)
TriStripp(3) = CreateTLVertex(328, 456, 0, 1, &HFFFFFF, 0, 1, 1)

Any idea?

Coordinate Systems
Hello All,

I took an introductory course in programming using Visual Basic two semesters ago, and by now I have forgotten some things about the language. I'm looking to brush up on the things I knew and learn some as well. What I'm trying to do is make a version of the game Pong. Here is where I need help...

Graphics were never reviewed in class, and my textbook (An Introduction to Programming using Visual Basic 6.0... anyone know this book?) says that before you can draw anything, you have to set a scale. Is it possible to just draw things in a picture box with respect to the size of that particular picbox?

Iso Coordinate System
i will make a backgamoon game.
i need iso coordinate system for that.
is there anyone who can help me ?

i try to coordinate likte that an image.

1 - 2 - 3 - 4 - 5 - 6 || 7 - 8 - 9 - 10 -11 -12


13 - 14 - 15 - 16 - 17 - 18 || 19 - 20 - 21 - 22 - 23 - 24 and 26 for the total.

if you can help me i'll be very happy.
bts regards

Coordinate Checking
Hey, I am doing something similar to a real time rpg. I want the enemies to check the players location every so often with a timer and then move towards the player. I keep getting an infinite loop and it feezes. With an If loop it only generates once and with a while loop it makes it infinite. Is there any other way I could do this.

Private Sub Timer1_Timer()
While Pic2.Height > Pic1.Height
Pic2.Height = Pic2.Height + 90
While Pic2.Left < Pic1.Left
Pic2.Left = Pic2.Left + 90
End Sub

This is just an example to move left and right with my code now.

Coordinate System
say i have a form.. and it has an image over it.. for the picture property..

and the user has on that form say 6 different circles on it that user is supposed to click on..

how do i tell what x,y coordinate the user clicked i know which circle they pressed..

i know there's probably other ways to do this but i would like to know how to use it doing the coordinate system.. any help would be appreciated. thank ya much


Vb Coordinate System
in vb coordinate system x-axis increases to left
y axis increases down wards

i have an application where i want to create grid on map in which y axis should increase upwards.

i tried to shift the control from top left but it did not work

please help

Coordinate (x,y) Display
I have seen a couple of RPG style of games using this method.. and I was just curious on how it was done. If you have a movable image... and your moving it around on the form, how can you have a label.. textbox.. etc display the coordinate that image is currently on? If I could figure this out, then it should be really easy to make a "Gridpassable = False" (make an image un passable to go through by another image). Thx for any ideas.

Clicking Coordinate
i am trying to select a certing coordinate on a webbrowser... i am trying to make a auto logon thing but the only way that i can see working is clicking on the username box so.... i think the coordinates are 720, 3960 i just dont no how to get the mouse to click there write there(Form2.Text1.Text) then click another spot then write(Form2.Text2.Text) then {Enter}

Iso Coordinate Sysytem
i will make a backgamoon game.
i need iso coordinate system for that.
is there anyone who can help me ?

i try to coordinate likte that an image.

1 - 2 - 3 - 4 - 5 - 6 || 7 - 8 - 9 - 10 -11 -12


13 - 14 - 15 - 16 - 17 - 18 || 19 - 20 - 21 - 22 - 23 - 24 and 26 for the total.

if you can help me i'll be very happy.
bts regards

CreateRoundRectRgn Coordinate
I'm confuse for determining the correct coordinate for CreateRoundRectRgn

i want to make the three icon on top of right (minimize, maximize, X) unseen

can someone help

X-coordinate In DIB BITS
Hello folks,
I've scratched out a function from the BytesPerScanLine Function which calculates the X coordinate of the DIB Section's Array using the following calculation.

Public Function GetSectionX(ByVal x As Long)
GetSectionX = (x * 3 + 3) And &HFFFFFFFC
End Function
Now when I used this function in the following manner it didn't work very well.I mean its I think not the correct function.

Public Sub gray(ByRef DIB As cDIBSection, ByRef BITS() As Byte)
Dim x As Long, y As Long
Dim OriginalX As Long
For x = 0 To DIB.Width - 1
For y = 0 To DIB.Height - 1
OriginalX = GetSectionX(x)
BITS(OriginalX, y) = BITS(OriginalX, y) * 0.299 + BITS(OriginalX + 1, y) * 0.587 + BITS(OriginalX + 2, y) * 0.114
BITS(OriginalX + 1, y) = BITS(OriginalX, y)
BITS(OriginalX + 2, y) = BITS(OriginalX, y)
Next y
Next x
Copy DIB
End Sub
Can anybody help me out...?

Asim Siddiqui.

Determine Y Coordinate
This is something I should be able to figure out but I'm having difficulty. The picture below shows my app open on the desktop and I would like to know how to determine the Y coordinate of the red line (drawn on the picture and not actually part of the app) so that I can change the MousePointer when the mouse is below that line in Form_MouseMove. The black area is a picturebox with a .Top = 0.

Coordinate Of Pixel
Hi, I want to make a program with a picture box that i can put a picture in, click a button and it tells me the coordinates of the most top left white pixel in the image. I have read around and some people have suggested bltblt, but apparantley it is slow.
I need to check a pixel for its colour, and then if its not white, move to the next one.

Does someone know a way to do this please.

thanks Alex

Coordinate Clicking?
Is there a code where I can make a simulation of a click in a certain part of the screen?

Invert Y Coordinate...
im making a program that shows graphs of exponential functions
and im using the standard picturebox...
the problem is that the picturebox coordinates starts in the upper left corner!


if i use a function like Y = 1.1 ^ X
the line will go down from the top
but if u use another function like Y = 0.9 ^ X
the line will start from the top and will be drawn over the
picturebox, therefor it will not be visible

does anyone know a way to invert the Y coordinates so
its drawn the other way?

please help me!

Sort Coordinate X,Y ?Help
how to sort the coordinate into a acending order where sort y axis first then x.



Edited by - wtkm on 11/14/2007 5:40:58 AM

Reading The Coordinate X
Hello everybody,
I'm writing a program that plot a chart with some columns and some rows. I'm using the MSChart, and some buttons to aplicate the functions, for example, show or not the Grid.
One function that I need is to set the

MSChart1.Plot.Axis.(VtChAxisIdX).ValueScale.Minimum =[value]

 so I have to set the manual scaling

 MSChart1.Plot.Axis(VtChAxisIdX).CategoryScale.Auto = False.
I can't find a function to read the coordinate X of a point (anypoint at plot part) so that I can apply on the minimum ValueScale.

I'm trying the MSChart1.X but it isn't work.
If anyone can help me, I'll apreciate.
A big Hug for you,

Coordinate System
I want to draw a coordinate system in centimetres.
I use the scale-method to do so and then draw two lines to show the system:
line( -10, 0)-(10, 0)
line( 0, -10)-(0, 10)
Then I draw a stroke every centimetre using this:
for i = -10 to 10
line (i, 0,1)-(i, -0,1)
line (0,1, i)-(-0,1, i)
next i

The problem:
The distance between the lines on the Y-axis is much smaller than the distance between the lines on the X-Axis!For example, if I try to draw a circle [circle(0, 0), 1] with the radius 1 the circle hits the lines on the X-Axis but is far above the ones on the Y-Axis!Strangely, if I try to draw a line between (1,1) and (2,2) the Y-points of the line are on the same level as the lines on the axis itself!
Can anyone help me please?
Thanks, Nanobert

VB Coordinate System
I would like to know how to setup a coordinate system in picturebox control to solve mathermatics question. Example a coordinate system with X-Axis range from -50 to 50cm and Y-Axis range from -50 to 50.


Setting Coordinate System With GDI...
I want to set upper left corner (0,400) and right bottom (200,200). Notice that orgin is below the visible area of the screen.

This is exactly like;

Form1.Scale (0,400)-(200,200).

But i want to do this with GDI because i use GDI drawing calls which the statement above doesn't make sense.

I've tried;

SetWindowOrgEx, SetWindowExtEx, SetViewportOrgEx, SetViewportExtEx

but with those you can do everything else than i want.

Any hep will be apreciated. Thanks guys.

Isometric Coordinate Problem
I have a picture box say 500-500 pixels(x,y).
Now on this picture box,I have 10x and 10 y tiles,each 50 pixels in height
and width.İts naturally easy to get the users click coordinates,and its according
box,because I planned it top down.(when the user clicks on x135,y155 my program
can tell that he pressed on box(3,4)=135/50=3,155/50=4.
Now the problem is,I want this gamefield(picture box) to be isometric,and
want to return it as my two dimensional box numbers(To understand
on which tile the user has clicked.) Can anyone help,If you do not understand
my problem please write that I will try to explain it more clearly.

2 Questions: Sdk And Coordinate Conversion
hello. the 1st question is simple: where can i get the dx 8.1 sdk. I crashed my hard drive and I need to redl it, but unfortunately it doesnt seem to exist on Microsoft's website.

#2: I had a post earlier about dx in a picturebox. I changed the screen format and the target hwnd and it worked fine. (btw, what dx format should I use for windowed mode? i am using some code off dx4vb since I just wanted to make sure I could render to the picture box. there were 2 formats at the top, one was commented out. the prog wouldnt run until i swapped the comment and used DispMode.Format = D3DFMT_X8R8G8B8. but I want to make sure this will render windowed mode on all systems, since it seems like it was pure luck that the code ran with this format since it was meant for a fullscreen app. so will DispMode.Format = D3DFMT_X8R8G8B8
render windowed on all computers?)

so anyways the main question: how would i translate a mousedown coordinate into coordinates of a point worldspace? i want to be able to click the picture box that is looking straight down at the .x file and be able to get the x and y coordinates in the world where the click occurred (coordinates at z=0). and i would need to do the same for a view from the front and from the side (front: x coords and z coords at y=0, side: y coords and z coords at x=0)

thx for any help

Get The Right Vertex Coordinate From A .x File
Hello to everybody,
i am developing my first 3d game. I use directx8 and vb6. I have created a very simple collision detection function. It detects the collision between a "projectile" and a rectangular plane(which could be a wall or something like that). I need to give to my function the coordinate of the 4 external vertex of the rectangular plane. I have also created,using 3d studio max, a .3ds (converted in .x) file in which there are some rectangular plane. I load it in my project then i copy the coordinate of all vertex in an array using:
hr = D3DXMeshVertexBuffer8GetData(Mesh, 0, (Len(VertArray(0)) *nPlane)), 0, VertArray(0))
The problem is that in VertArray i have the coordinate of a lot of vertex and i am not able to understand which of this vertex are the 4 external vertex of every rectangular plane in my .x file

Y Coordinate Of A Bubble In Chart
I am trying to display the X and Y coordinates of bubbles in a bubble chart when clicking on a bubble (using VBA in excel).
The X coordinates I display by means of the command
" Charts("Chart1").SeriesCollection(a).XValues"

However, I get an error when I try to display the Y coordinate while using

The expression "YValues" is apparently not recognised and/or not right. Who could tell me how to address the Y coordinate?

Thanks a lot,

Something Wrong With My Coordinate Transformations
I'mmaking a program that reads coordinates from a file annd draws figures with them. Depending on the scrollbars, the figures are rotated around the x an y axis. When I scroll the x scrollbar, it looks ok, when I scroll the y scrollbar it looks ok too, but the 3d shape of the figure appears to be different in both cases. When I scroll both the scrollbars, it doesn't look ok at all... Here is my code, but there's also a file test.txt with the data. The whole project can be downloaded at

Private Sub Command1_Click()

Call teken

End Sub

Public Sub teken()

Dim bestandsnaam, lijn, legelijn, xcs, ycs, zcs As String
Dim x(0 To 30), y(0 To 30), z(0 To 30) As Single
Dim grens, lengte As Integer
Dim matrixrotatiex(1 To 4, 1 To 4) As Single
Dim matrixrotatiey(1 To 4, 1 To 4) As Single
Dim matrixrotatie(1 To 4) As Single
Dim punta(1 To 3) As Single
Dim puntb(1 To 3) As Single
Dim puntatrans(1 To 3) As Single
Dim puntbtrans(1 To 3) As Single
Dim puntatrans2(1 To 3) As Single
Dim puntbtrans2(1 To 3) As Single

matrixrotatiex(1, 1) = 1
matrixrotatiex(1, 2) = 0
matrixrotatiex(1, 3) = 0
matrixrotatiex(1, 4) = 0
matrixrotatiex(2, 1) = 0
matrixrotatiex(2, 2) = Cos(ix.Value / 10)
matrixrotatiex(2, 3) = Sin(ix.Value / 100)
matrixrotatiex(2, 4) = 0
matrixrotatiex(3, 1) = 0
matrixrotatiex(3, 2) = -Sin(ix.Value / 10)
matrixrotatiex(3, 3) = Cos(ix.Value / 10)
matrixrotatiex(3, 4) = 0
matrixrotatiex(4, 1) = 0
matrixrotatiex(4, 2) = 0
matrixrotatiex(4, 3) = 0
matrixrotatiex(4, 4) = 1

matrixrotatiey(1, 1) = Cos(iy.Value / 10)
matrixrotatiey(1, 2) = 0
matrixrotatiey(1, 3) = -Sin(iy.Value / 10)
matrixrotatiey(1, 4) = 0
matrixrotatiey(2, 1) = 0
matrixrotatiey(2, 2) = 1
matrixrotatiey(2, 3) = 0
matrixrotatiey(2, 4) = 0
matrixrotatiey(3, 1) = Sin(iy.Value / 10)
matrixrotatiey(3, 2) = 0
matrixrotatiey(3, 3) = Cos(iy.Value / 10)
matrixrotatiey(3, 4) = 0
matrixrotatiey(4, 1) = 0
matrixrotatiey(4, 2) = 0
matrixrotatiey(4, 3) = 0
matrixrotatiey(4, 4) = 1

bestandsnaam = bestand.Text

Open bestandsnaam For Input As #1

Line Input #1, lijn
grens = Val(lijn)

veld.ScaleWidth = grens
veld.ScaleHeight = -grens
veld.ScaleLeft = -grens / 2
veld.ScaleTop = grens / 2

Do Until EOF(1)

Line Input #1, xcs
lengte = Len(xcs)
Line Input #1, ycs
Line Input #1, zcs
Line Input #1, legelijn

For n = 0 To lengte / 6 - 1
x(n) = Mid(xcs, n * 6 + 1, 5)
y(n) = Mid(ycs, n * 6 + 1, 5)
z(n) = Mid(zcs, n * 6 + 1, 5)
Next n

For n = 0 To lengte / 6 - 2

punta(1) = CSng(x(n))
punta(2) = CSng(y(n))
punta(3) = CSng(z(n))
puntb(1) = CSng(x(n + 1))
puntb(2) = CSng(y(n + 1))
puntb(3) = CSng(z(n + 1))

VectorMatrixMult puntatrans(), punta(), matrixrotatiex()
VectorMatrixMult puntatrans2(), puntatrans(), matrixrotatiey()
VectorMatrixMult puntbtrans(), puntb(), matrixrotatiex()
VectorMatrixMult puntbtrans2(), puntbtrans(), matrixrotatiey()

veld.Line (puntatrans2(1), puntatrans2(2))-(puntbtrans2(1), puntbtrans2(2))

Next n

punta(1) = CSng(x(n))
punta(2) = CSng(y(n))
punta(3) = CSng(z(n))
puntb(1) = CSng(x(0))
puntb(2) = CSng(y(0))
puntb(3) = CSng(z(0))

VectorMatrixMult puntatrans(), punta(), matrixrotatiey()
VectorMatrixMult puntbtrans(), puntb(), matrixrotatiey()
VectorMatrixMult puntatrans(), puntatrans(), matrixrotatiex()
VectorMatrixMult puntbtrans(), puntbtrans(), matrixrotatiex()

veld.Line (puntatrans(1), puntatrans(2))-(puntbtrans(1), puntbtrans(2))


Close #1

End Sub

Sub VectorMatrixMult(a() As Single, b() As Single, c() As Single)

a(1) = c(1, 1) * b(1) + c(1, 2) * b(2) + c(1, 3) * b(3)
a(2) = c(2, 1) * b(1) + c(2, 2) * b(2) + c(2, 3) * b(3)
a(3) = c(3, 1) * b(1) + c(3, 2) * b(2) + c(3, 3) * b(3)

End Sub

Private Sub iy_Change()
Call teken
End Sub

Private Sub iy_Scroll()
Call teken
End Sub

Private Sub ix_Change()
Call teken
End Sub

Private Sub ix_Scroll()
Call teken
End Sub

Coordinate System Problems
hi everybody,

i have two problem with coordinate system.

one, i want to move the origin point from upper-left to lower-left. but how?

second, i have some basic geometrical shapes in a picture box. i want to rotate them with an angle value inputted from outside. but how?

is there anybody knowing about this or having simple codes?

thanks a lot....

Universal Time Coordinate API!
Is there an API, Object or class in VB that Convert UTC TimeStamp to its y/m/d/h/m/s ?

Clicking Mouse At Certain X,y Coordinate
Can someone provide sample code of how this can be accomplished?

Changing The X Coordinate Diplay Value In Vb
I want to change the x coordinate value in graph chart. already it display sequential numbers but i want to display what ever i want.
i am storing the array[][5], array[][0]is firstvalue index for x axis and next four values are datas are stored in sequential i want to display the four data's and the x axis value, i changed the array[][0]. that is not changing display. please give me idea to proceed

Copyright 2005-08, All rights reserved