Hello everyone,
As I have just completed the first part of a series of tutorials I'm planning to do, I would like to see if I can have some input about whether or not it's understandable or not.
English is not my mother language, so I would like (if possible) for someone to proof-read this.
The tutorials will cover pretty much every basic thing you can do with 3D math. For now, I started with vectors (I wanted to start with something less hard). I already have prototype tutorials for matrices, square matrices and I was planning to start on a prototype for transformations of vectors and homogeneous coordinates, followed by a description of the rendering transformations used by DirectX. I do not plan to go too theoretical, so that this tutorial will stay understandable to most beginners as well. The goal is to provide programmers some tools to solve problems that might not be possible without vectors.
Vectors in DBP
Requirements:
- Basic knowledge about trigonometry.
- A left or a right hand.
- Some basic mathematical background (*, -, +, /, using symbols, ...).
Index
1 Introduction
2 What is a vector?
3 Vector Operations
a) Scalar multiplication
b) Vector addition and subtraction
c) Dot product
Formula
Length of a vector
Interpretation of the dot product
d) Cross product
4 Homogeneous coordinates
5 Vectors in DarkBasic Pro
a) Miscellaneous commands
b) Commands for vector operations
2D Vectors
3D Vectors
4D Vectors
6 Examples in DarkBasic Professional
a) Basic operations
b) Finding the angle between 2 vectors
Download
[edit] It seems that all images were horribly distorted when converting to PDF format. I will try to fix this.
[edit] Fixed.
[edit] Sorry, I noticed a few errors...
[edit] 13/01/2011 Update
[edit] 16/01/2011 Update
[edit] 1/02/2011 Smaller PDF file
Easy Transformations in DBP
Requirements:
- A basic understanding of vectors
This tutorial covers the basics of what you need to know to work with transformations. No real math knowledge is needed for this one.
Index:
1. Introduction 2
2. What are transformations? 3
a) Scaling a vector 4
b) Translating a vector 4
c) Rotating a vector 4
2. Transformations in DB 6
a) Building transformations 6
b) Transforming vectors 6
c) Basic example 6
3. Combining transformations 8
4. Examples in DarkBasic Pro 9
a) Drawing a rotated 2D box 9
Download
Matrices and Transformations in DBP
Requirements:
- Preferably good understanding of the concepts in the tutorial "Vectors in DBP".
- Basic trigonometry
- Mental preparation
- Some time
This tutorial contains everything that I think you should know about matrices and transformations to
fully understand it. This means that it contains much more than the basic idea of transformations.
Index
1. Introduction 3
2. What is a matrix? 4
3. Matrix Operations 5
a) Scalar multiplication 5
b) Matrix addition and subtraction 5
c) Matrix multiplication 6
d) Matrix transpose 8
4. What are square matrices? 10
5. Square matrix operations 12
a) Matrix Power 12
b) Matrix Determinant 12
The formula 12
Connection to the cross product 14
c) Matrix Inverse 14
6. Transformations 16
a) From vectors to matrices 16
b) A general transformation 16
c) Scaling 19
d) Rotating 20
7. From 2D to 3D transformations 22
a) Scaling 22
b) Rotation 22
7. Transforming homogeneous coordinates 24
a) From 3D to homogeneous coordinates 24
b) Translation matrix 25
c) Combining transformations 26
8. Transformations in DarkBasic Pro 27
a) Matrix4 27
b) Transforming vectors 28
9. Examples in DarkBasic Pro 29
a) Translating a vector 29
b) Combining matrices 30
c) Orthographic view 31
Download
Any input is appreciated.
Cheers!
Sven B