Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Eric.Erpelding

Pages: [1]
1
Bug Reports / Error when starting GLBasic v15
« on: 2017-Oct-12 »
Hello Forum,

I just installed GLBasic v15 on a Windows 10 64-bit computer and when I started the program I got an error message window stating that there was a problem with the c-runtimes and to call FIDES or see KB3118401. The message ended by saying "Do not use this software"!

Has anyone else seen this?



2
This is my first attempt at making a 3D representation of a revolving vector using GLBasic.
Actually, it is my first attempt at writing any kind of 3D graphics program.
The code is very simple and will be the basis for further development.
Specific parameter values have been hard coded into this version just to get something working.
Any comments will be appreciated.

Code: GLBasic [Select]
// --------------------------------- //
// Project: Revolving Arrow Vector
// Start: Sunday, August 21, 2016
// IDE Version: 14.001

GLOBAL cone, cylinder
GLOBAL phi

GLOBAL ArrowHeadColor, ArrowShaftColor

ArrowHeadColor=RGB(255,0,0)
ArrowShaftColor = RGB(255, 153,51)

// object numbers
cone = 0
cylinder=1

// CreateCone: num, r, h, n, col
CreateCone(cone,6,10,20, ArrowHeadColor)

// CreateCylinder: num, r, h, n, col
CreateCylinder(cylinder,3,50, 20, ArrowShaftColor)


WHILE TRUE
    INC phi, 1.
    X_MAKE3D 1,1000,45

    X_CAMERA 100,75,100, 0,25,0
   
    X_MOVEMENT 0,0,0
   
    // Draw co-ordinate axis
    X_LINE 0,0,0,100,0,0,5,RGB(0,0,255)
    X_LINE 0,0,0,0,100,0,5,RGB(0,0,255)
    X_LINE 0,0,0,0,0,100,5,RGB(0,0,255)
   
    // Draw rotated arrow vector
    X_ROTATION 45, COS(phi),0,-SIN(phi)
    X_DRAWOBJ cylinder,0
    X_MOVEMENT 50*COS(45)*SIN(phi),50*SIN(45),50*COS(45)*COS(phi)
    X_ROTATION 45, COS(phi),0,-SIN(phi)
    X_DRAWOBJ cone,0

    SHOWSCREEN
WEND

// ------------------------------------------------------------- //
// -=#  CONE  #=-
// ------------------------------------------------------------- //
FUNCTION CreateCone: num, r, h, n, col
LOCAL i,j,theta,pi
        pi = ACOS(0)*2
        IF r < 0 THEN r = -r
        IF n < 4 THEN n = 4

        X_AUTONORMALS 2
        X_OBJSTART num
        FOR i=0 TO n
                theta = i * 2*pi / n;
                X_OBJADDVERTEX   0, h, 0, 0, 0, col
        X_OBJADDVERTEX  r*COS(theta),0,r*SIN(theta),0,0,col
        theta = (i+1)*2*pi/n
        X_OBJADDVERTEX  r*COS(theta),0,r*SIN(theta),0,0,RGB(255,255,255)
        X_OBJADDVERTEX 0,0,0,0,0,col
        X_OBJNEWGROUP

        NEXT
        X_OBJEND
ENDFUNCTION

// ------------------------------------------------------------- //
// -=#  CYLINDER  #=-
// ------------------------------------------------------------- //
FUNCTION CreateCylinder: num, r, h, n, col
LOCAL i,j,theta,pi
        pi = ACOS(0)*2
        IF r < 0 THEN r = -r
        IF n < 4 THEN n = 4

        X_AUTONORMALS 2
        X_OBJSTART num
        FOR i=0 TO n
                theta = i * 2*pi / n;
                X_OBJADDVERTEX   r*COS(theta),0,r*SIN(theta),0,0,col
        X_OBJADDVERTEX  r*COS(theta),h,r*SIN(theta),0,0,col
        theta = (i+1)*2*pi/n
        X_OBJADDVERTEX  r*COS(theta),0,r*SIN(theta),0,0,col
        X_OBJADDVERTEX  r*COS(theta),h,r*SIN(theta),0,0,col
        X_OBJNEWGROUP

        NEXT
        X_OBJEND
ENDFUNCTION

3
GLBasic - en / Online RGB Color Codes Chart
« on: 2016-Aug-14 »
This is something very useful to have bookmarked in your browser.

RGB Color Codes Chart
http://www.rapidtables.com/web/color/RGB_Color.htm

4
I am trying to use sscanf inside a block of INLINE code.
But the GLBasic compiler gives this error:
Quote
error: `sscanf' was not declared in this scope
The same "not declared in this scope" error occurs if I try to call the printf fuction as well.
Can one use these functions in INLINE code?

5
I think I understand the operation of GLBasic's CALLBACK functions.
A CALLBACK function can be overloaded by a function with the same name, essentially replacing the CALLBACK function with the non-CALLBACK function over the whole GLBasic project.

Can anyone explain why the CALLBACK function is designated using the word CALLBACK?

The Wiki article on CALLBACK states:
Quote
In computer programming, a callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time.

So in GLBasic what code is CALLing BACK?


6
The on-line GLBasic manual contains the following:
Quote
The simplest way to create a 3D object within GLBasic is via loading a 3D file. You simply create it with a 3D program, export it in Quake '.md2' or 3D Studio '.3ds' format, and convert it to a compressed '.ddd' file with the 3DConvert tool.

I am completely new to using any 3D program to create objects.
What would be a good, easy to learn and use, program to use?
What do people here in the forum use?

It would be extra good if it is also freeware!

7
Dear GLBasic Forum,
I would like to visualize circularly polarized waves using GLBasic.
As an example of what I would like to program, see this Youtube video:
https://www.youtube.com/watch?v=Fu-aYnRkUgg
It should be possible to use GLBasic for this purpose.

8
Dear GLBasic forum members,
I would like to create a program to visualize the orientation in 3D space of a orthogonal coordinate system.
The orientation of the coordinate system is specified using Euler angles the values of which would be controlled using slider controls.
The coordinate axis of the rotated system will be represented by arrow vectors.

Perhaps the forum could provide some hints as to how to get started on such a project using GLBasic?

The diagram contained in the Wiki article on Euler angles gives an idea of what I would like to create.
https://en.wikipedia.org/wiki/Euler_angles

9
GLBasic - en / GLBasic generated C++ code
« on: 2016-Aug-07 »
Hello GLBasic Forum.
Is there a way to view the C++ code that is made from the GBAS source code?

10
GLBasic - en / GLBasic line continuation?
« on: 2016-Jul-15 »
Hello GLBasic forum members.
I have a question concerning long statements in GLBasic.
Does GLBasic have a way to continue a statement on another line?
One version of BASIC uses the underscore character, "_", at the end of a line to indicate that the statement continues on the next line of code.
Is there something similar in GLBasic?

11
GLBasic - en / Threads in GLBasic?
« on: 2016-Mar-17 »
Hello GLBasic Programmers, I have a simple question.
Does GLBasic support threads in Windows?

Pages: [1]