I meant that you can do:

Code:

`Dim sb As New StringBuilder("Ciao")`

comments in code - some like them, some need them, some hate them...

In thinBASIC you can do both single line comments and multi line ones:

Code:

`' I am single line`

/*

I am

multi

line

*/

https://testing.googleblog.com/2017/...o-comment.html

mentioning XML was just example - it does not have to be XML, could be JSON or other general purpose structured storage format.

The benefit would be separation of GUI design from code which controls it.

There is no FROMFILE option for DIALOG NEW now, but I thought it could be good for future development.

In above comment, Petr said that enabling unicode for GUI elements need to do some work. I have a qustion. In my little knowledge, these are the functions which needs to create a window from scratch. I think GUI creating functions in thinBasic are wrapping these functions.

1. GetModuleHandle

2. LoadCursor

3. ExtractIconEx

4. CreateSolidBrush

5. GetSysColor

6. RegisterClassEx

7. CreateWindowEx

And this is my question. For enabling unicode in GUI elements, does replacing these functions with their unicode version will work ? I mean except functions in number 4 and 5, all of them have unicode versions with "W" in their names. And like Petr said, if you want to preserve ASCII enabled GUIs, then we can use a "Define Unicode" statement abovet the script. If that statement is there, then interpreter will call the CreateWindowExW function instead of CreateWindowEx function. ]]>

this is the tangent and the normal

look for explanation:

https://www.siyavula.com/maths/grade...s-04.cnxmlplus

to find a tangent is to find a derivative at that point (one of the Calculus lessons), the best place to find the derivative is wolfram alpha, such as to find the derivative of y = Sin(x) go to

http://www.wolframalpha.com/input/?i...tive+of+sin(x)

and it will give you Cos(x)

the derivative of x^2 is 2*x

look at the folowing curve and its tangent, at the newTurn of the curve it seems to slow down because there is a lot of points there (condensed).

i have used a box to represent the tangent, because i find tbgl_Cylinder rotate around one of its sides and not from its center, (useful for tree branches generation).

if i use tbgl_cylinder instead of the tbgl_box like this way:

Code:

`TBGL_Translate x,y,0`

'TBGL_Rotate 0,0,slope

TBGL_Rotate slope,0,0

TBGL_Rotate -90,0,0

TBGL_Cylinder 0.1,0.1,1

curve

Code:

`Uses "TBGL", "Math" `

Begin Const

%listPoints = 1

End Const

Dim FrameRate As Double

Local hWnd As DWord

hWnd = TBGL_CreateWindowEx("curve tangent .... press 'Space' to move the Tangent line over the curve", 800, 600, 32, %TBGL_WS_WINDOWED Or %TBGL_WS_CLOSEBOX)

TBGL_ShowWindow

TBGL_BackColor(255,255,255)

TBGL_ResetKeyState()

Global x,y As Single

' catch the data and store it to %listPoints

TBGL_NewList %listPoints

TBGL_Color(0,0,0)

TBGL_PointSize 3

For x = -2.5 To 2.5 Step 0.01

y = x^2 - 3 ' just to shift down the curve

TBGL_BeginPoly(%GL_POINTS)

TBGL_Color(150, 150, 255 )

TBGL_Vertex(x,y)

TBGL_EndPoly

Next

TBGL_EndList

TBGL_ResetKeyState()

x = -2.5: y = 0

Global slope, slopeAngle As Single

While TBGL_IsWindow(hWnd)

FrameRate = TBGL_GetFrameRate

TBGL_ClearFrame

TBGL_RenderMatrix2D( -5, -5, 5, 5 )

TBGL_CallList %listPoints

If TBGL_GetWindowKeyState( hWnd, %VK_SPACE) Then

x + 0.01

y = x^2 - 3 ' just to shift down the curve

slope = 2*x ' This is the derivative of f(y)=x^2

slopeAngle = RadToDeg(Atn(slope)) 'find the angle correspend to slope and convert it to degrees

'slopeAngle = (Atn(slope))*180/Pi 'find the angle correspend to slope and convert it to degrees

End If

TBGL_Translate x,y,0

TBGL_Rotate slopeAngle,0,0

TBGL_Color(255, 0, 0 )

TBGL_Box 1, 0.05, 0.2

TBGL_Rotate 180,0,0

TBGL_Cylinder 0.02,0.02,0.5

TBGL_DrawFrame

If TBGL_GetWindowKeyState(hWnd, %VK_ESCAPE) Then Exit While

Wend

TBGL_DestroyWindow

Code:

`Uses "TBGL", "Math" `

Begin Const

%listPoints = 1

End Const

Dim FrameRate As Double

' Handle for our window

Local hWnd As DWord

hWnd = TBGL_CreateWindowEx("curve tangent .... press 'Space' to move the Tangent line over the curve", 800, 600, 32, %TBGL_WS_WINDOWED Or %TBGL_WS_CLOSEBOX)

TBGL_ShowWindow

' Set background to white

TBGL_BackColor(255,255,255)

TBGL_ResetKeyState()

Global x,y As Single

' catch the data and store it to %listPoints

TBGL_NewList %listPoints

TBGL_Color(0,0,0)

TBGL_PointSize 3

For x = -5 To 5 Step 0.01

y = Sin(x)

TBGL_BeginPoly(%GL_POINTS)

TBGL_Color(150, 150, 255 )

TBGL_Vertex(x,y)

TBGL_EndPoly

Next

TBGL_EndList

TBGL_ResetKeyState()

x = -5: y = 0

Global slope, slopeAngle As Single

While TBGL_IsWindow(hWnd)

FrameRate = TBGL_GetFrameRate

TBGL_ClearFrame

TBGL_RenderMatrix2D( -5, -5, 5, 5 )

TBGL_CallList %listPoints

If TBGL_GetWindowKeyState( hWnd, %VK_SPACE) Then

x + 0.01

y = Sin(x)

slope = Cos(x) ' This is the derivative of f(y)=Sine(x)

slopeAngle = RadToDeg(Atn(slope)) 'find the angle correspend to slope and convert it to degrees

'slopeAngle = (Atn(slope))*180/Pi 'find the angle correspend to slope and convert it to degrees

End If

TBGL_Translate x,y,0

TBGL_Rotate slopeAngle,0,0

TBGL_Color(255, 0, 0 )

TBGL_Box 1, 0.05, 0.2

TBGL_Cylinder 0.02,0.02,0.5

'TBGL_Box 0.1, 1, 0.1

TBGL_DrawFrame

If TBGL_GetWindowKeyState(hWnd, %VK_ESCAPE) Then Exit While

Wend

TBGL_DestroyWindow

my boss from robotics era, scientist and a great friend would like to visit Portland with his son around 21st of August to witness the solar eclipse.

He managed to get the tickets, but there is an issue with accomodation, because

Is there any thinBASICer who lives around and would volunteer to provide shelter for sleepover for one big and one little human? :)

Thanks,

large zooms are not an issue for some time - combination of small chip (large crop factor) with classic lens can give a significant zoom boost.

I am using myself Nikon 1 with 300mm full frame lenses, which gives, thanks to 2.7 crop factor, 810mm equivalent field of view. Great for Moon observing.

Regarding this video in particular, I consider it behind the edge of ethic use of camera technology. Bill Gates is human as well, and sharing his private time with family on youtube is somehow wrong in my eyes.

Björn ]]>

By default, when you draw graphics primitives, TBGL uses depth testing. That allows you to draw primitives in any order and they will be sorted correctly.

However.

For edge cases, such as 2D graphics, which overlay one over each other, this can be an issue - depending on implementation and moon phase, artifacts could pop up.

That is why I recommend to disable depth testing in order to be able to paint like painter, one thing after another, in order dependent way.

Here is example to demonstrate the issue in obvious way:

Code:

`uses "TBGL" `

function tbMain()

double FrameRate

' -- Create and show window

dWord hWnd = tbgl_createWindowEx("Depth testing artifacts - press ESC to quit", 640, 240, 32, %tbgl_WS_WINDOWED | %tbgl_WS_CLOSEBOX)

tbgl_showWindow

' -- Resets status of all keys

tbgl_resetKeyState()

single angle

' -- Main loop

while tbgl_IsWindow(hWnd)

FrameRate = tbgl_getFrameRate

angle += 45/FrameRate

tbgl_clearFrame

tbgl_camera(0, 0, 5, 0, 0, 0)

tbgl_pushMatrix

tbgl_translate -2, 0, 0

tbgl_rotate angle, 0, 1, 0

tbgl_color 255, 255, 0

tbgl_rect(-1, -1, 1, 1)

tbgl_color 255, 0, 0

tbgl_ngon(0, 0, 1, 180)

tbgl_popMatrix

tbgl_pushStateProtect %TBGL_DEPTH

tbgl_pushMatrix

tbgl_translate 2, 0, 0

tbgl_rotate -angle, 0, 1, 0

tbgl_color 255, 255, 0

tbgl_rect(-1, -1, 1, 1)

tbgl_color 255, 0, 0

tbgl_ngon(0, 0, 1, 180)

tbgl_popMatrix

tbgl_popStateProtect

tbgl_drawFrame

' -- ESCAPE key to exit application

if tbgl_getWindowKeyState(hWnd, %VK_ESCAPE) then exit while

wend

tbgl_destroyWindow

end function