Search found 14 matches

by S.T.
Sat Jan 30, 2016 2:47 am
Forum: 3D Programming
Topic: Camera Orientation
Replies: 9
Views: 4767

Re: Camera Orientation

Hi Michael,
3D visualization is all about working with different coordinate systems. You have a World coordinate system and you place other entities in this World using the local coordinate system of that entity. Camera is one entity and its orientation must be defined with respect to the World ...
by S.T.
Mon Jan 25, 2016 3:41 am
Forum: 3D Programming
Topic: Camera Orientation
Replies: 9
Views: 4767

Re: Camera Orientation

I do not see any action or response to my request for fixing the error that I mentioned here. I need to position a camera at a precise location and that is possible in concept in 3D programming. Yes, I mentioned the example posted was "nice" but that still cannot position a camera correctly and with ...
by S.T.
Sat Jan 02, 2016 3:26 pm
Forum: 3D Programming
Topic: Camera Orientation
Replies: 9
Views: 4767

Re: Camera Orientation

Thanks applePi,
I could see the result of your code in Windows, it was nice. I understand how you use mouse movement to rotate the camera. This works for cases that you don't need to know exact orientation of the camera. User can play with mouse and look at the scene. However it is part of ...
by S.T.
Sat Jan 02, 2016 4:12 am
Forum: Feature Requests and Wishlists
Topic: 3D Visualization - Camera Orientation
Replies: 3
Views: 4741

3D Visualization - Camera Orientation

CameraDirectionX() and the other two vectors:
Documentation says
Return value

Returns the 'x' direction vector of the camera. This value is always between -1.0 and 1.0.

Since a direction vector cannot be specified with a scalar this should return 3 components specifying the vector.

Also there ...
by S.T.
Fri Jan 01, 2016 8:27 pm
Forum: 3D Programming
Topic: Camera Orientation
Replies: 9
Views: 4767

Re: Camera Orientation

Thanks ApplePi,
I tried your code, compiler could not find line 26 function, GetSystemMetrics().
I see that PueBasic help for CameraDirectionX() says:

Return value

Returns the 'x' direction vector of the camera. This value is always between -1.0 and 1.0.

However a vector cannot be specified by a ...
by S.T.
Fri Dec 25, 2015 10:01 pm
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

Re: 3D Coordinate System

This is fixed in version 5.41
Thanks!
by S.T.
Fri Dec 25, 2015 7:09 am
Forum: 3D Programming
Topic: Camera Orientation
Replies: 9
Views: 4767

Camera Orientation

Question:
After a camera is created and camera Z direction is set using CameraLookAt function, then how do you set the direction of the X axis of the cameral relative to the World coordinate system? I want to make X parallel to a known vector but CameraLookAt does not take more than coordinates of ...
by S.T.
Wed Dec 23, 2015 11:39 pm
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

Re: 3D Coordinate System

Thank you all for sending your codes/comments.
What I am concerned about is the right-handed sense of the coordinate system not really the color. If you consider a vector multiplication like u x v = w where u is the unit vector along x and v is the unit vector along y then the product w must be ...
by S.T.
Tue Dec 22, 2015 1:59 am
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

Re: 3D Coordinate System

Thank you all who helped to track down this bug. I think Fantasia will need to take care of this for mac.
I installed PureBasic as a windows version on my mac as I have also Windows installed and I got what you got.

Now I need to report this as a bug which I don't know how?

Wish a great happy new ...
by S.T.
Tue Dec 22, 2015 1:36 am
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

Re: 3D Coordinate System

I see this on a mac laptop:

http://i.imgur.com/d5OF7NS.jpg?1

Which is different with what you get on Windows. What you got is correct but not what I get on mac.
The color of lines are different from colors of the arrows except for green. In fact if you turn off the arrows you see a left-handed ...
by S.T.
Mon Dec 21, 2015 10:15 pm
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

Re: 3D Coordinate System

Look at CreateLine3D.pb example

red is X and to the RIGHT direction.
green is Y and to the top direction.
blue is Z and to the front direction.


Thanks for pointing to the CeateLins3D example. It shows the same thing and Z is to the front but this is not a coordinate system defined by right hand ...
by S.T.
Mon Dec 21, 2015 9:50 pm
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

Re: 3D Coordinate System

I don't know.

If I insert you code lines into an 3D example, I get a correct result:
red is X and to the left direction.
green is Y and to the top direction.
blue is Z and to the front direction.
That's right handed.

For a right handed system Z should point towards yourself when X is to the ...
by S.T.
Mon Dec 21, 2015 8:32 pm
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

Re: 3D Coordinate System

I don't know.

If I insert you code lines into an 3D example, I get a correct result:
red is X and to the left direction.
green is Y and to the top direction.
blue is Z and to the front direction.
That's right handed.

For a right handed system Z should point towards yourself when X is to the ...
by S.T.
Mon Dec 21, 2015 7:59 pm
Forum: 3D Programming
Topic: 3D Coordinate System
Replies: 24
Views: 12265

3D Coordinate System

I am trying to use pure basic for 3D visualization in engineering. I learned from the help that coordinate system in PureBasic is a right handed coordinate system. Then I did a simple test:

CreateLine3D(#PB_Any, 0, 0, 0, RGB(255,0,0),100, 0, 0, RGB(255,0,0)) ; X axis
CreateLine3D(#PB_Any, 0, 0, 0 ...