473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Conversion from 3d coords to 2d

Ok, here is the deal.

I want to do this.... i have a group of cubes, i want to draw them,
and then rotate, etc,etc. i've already tried DirectX 9 but now i want
to draw the images direct to a picturebox... i know about some
formulas, but i can't find them.... does anybody know how to do
this???
Nov 20 '05 #1
1 1351
You have so many options its amazing. Using direct 3d is your best bet of
course because it comes with all the gizmos you need. Otherwise, you will
need to create your own (fairly simple) classes.

You will need:

A matrix class (3x3 or 4x4, prefer 4x4)
A vector class (x, y, z or x, y, z, w)

Then, after rotating/translation/scaling your cubes, you simply multiply
each point by the perspective transform matrix, or more simply, something
like x = x / z, y = y / z (scaled up to fit into the window).

There are literally thousands of tutorials around the net on how to do this.
Perhaps you should google for "3d matrix math", "perspective transform",
"vector matrix multiply".

Good luck.

"Antonio Orozco" <ca**********@hotmail.com> wrote in message
news:c7*************************@posting.google.co m...
Ok, here is the deal.

I want to do this.... i have a group of cubes, i want to draw them,
and then rotate, etc,etc. i've already tried DirectX 9 but now i want
to draw the images direct to a picturebox... i know about some
formulas, but i can't find them.... does anybody know how to do
this???

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ian.H | last post by:
Hi all, I don't have ImageMagick installed currently (and not sure if this has the ability or not anyway yet), but I've done some googling and not come up with much (if anything) regarding this....
1
by: Dave Harris | last post by:
I have written a reasonably clean way to perform coordinate transformations on a polygon, but Tkinter Canvas is not being particularly cooperative. The following program has been distilled down to...
1
by: Stub | last post by:
Docs says that "The compiler does not use an explicit constructor to implement an implied conversion of types. It's purpose is reserved explicitly for construction." I put up code of three cases...
2
by: Stimp | last post by:
I remember doing something like this before, but it's been a while since I've touched javascript... I have a standard <img> and when a user clicks the image I want to output the IMAGE x y...
11
by: Steve Gough | last post by:
Could anyone please help me to understand what is happening here? The commented line produces an error, which is what I expected given that there is no conversion defined from type double to type...
3
by: tommydog | last post by:
i am trying to generate an image map from the mouse coords of a click. i can pass the X Y through ok as $_POST $_POST how should the string be put into the AREA tag ? i am keeping the diameter...
3
by: Matthias Vodel | last post by:
Hi all, I want to change the beginning/end-coordinates of a canvas.line item. Something like: self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new, y2_new)) I don't want...
0
by: Head In A Pan | last post by:
Hello! I have a basic javascript mouse tracker which captures the X&Y coords of the window & displays them in two separate text fields. What I am desperate to do is to post these values to...
1
by: jojoba | last post by:
Hi I am trying to determine coordinates of something in a webpage. All i have is a subset of html that i know exists in a given webpage. Now i want to find that subsetHtml in the page and...
3
by: Rhishabh07 | last post by:
how to define coords in an image for an area shape i m using <img src="left.jpg" width="350" height="29" alt="Planets" usemap ="#planetmap" /> <map id ="planetmap" name="planetmap">...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.