PDA

View Full Version : wolframalpha project is finally online



ErosOlmi
18-05-2009, 12:19
http://www.wolframalpha.com/

Petr Schreiber
18-05-2009, 14:37
Very interesting project,

Wolfram Mathematica website is good resource for studies, and this "multi tool" looks interesting too.

I just asked WA for "Milano" and it says 28°C, can you confirm that Eros :)?

ErosOlmi
18-05-2009, 15:01
Yes, today is very hot !

Charles Pegge
18-05-2009, 15:56
No temperature given for Fishguard, but this afternoon it's 14C (361 feet above sea level according to WA) and I am sitting here in my winter gear, listening to the wind howling through the trees.

Charles

Petr Schreiber
18-05-2009, 16:00
Hi Charles,

isn't this your Fishguard?:
http://www40.wolframalpha.com/input/?i=Fishguard

They say even 13°C. Unbelieveable, I have 23 here, and you have winter weather!

ErosOlmi
18-05-2009, 16:02
No temperature given for Fishguard, but this afternoon it's 14C (361 feet above sea level according to WA) and I am sitting here in my winter gear, listening to the wind howling through the trees.

Charles


:grrrr: I love winter, I love wind.
I would like to be there !!!

Instead I'm here: http://www40.wolframalpha.com/input/?i=nova+milanese
28C :heat:

Petr Schreiber
18-05-2009, 16:36
Eros,

I can't watch you suffer, take first aid here:


'
' CPU Friendly Fan
'

USES "UI", "TBGL"

' -- ID numbers of controls
Begin Const
%lblCanvas = 1000
%btnClose
%btnSwitch

%myTimer
%timeOut = 10 ' -- Determines graphics refresh rate in milliseconds
End Const

TYPE tFan
STATIC eventSwitch AS STRING
STATIC eventRender AS STRING
STATIC eventPhysics AS STRING
running AS LONG
speed AS SINGLE
angle AS SINGLE
END TYPE

DIM Fan AS tFan
WITH Fan
.eventSwitch = "Fan_Switch"
.eventRender = "Fan_Render"
.eventPhysics = "Fan_Physics"
END WITH

GLOBAL FrameRate AS DOUBLE

FUNCTION TBMAIN()

LOCAL hDlg AS DWORD

DIALOG New 0, "Cooling fan",-1,-1, 320, 230, _
%WS_POPUP Or %WS_VISIBLE Or _
%WS_CLIPCHILDREN Or %WS_CAPTION OR _
%WS_SYSMENU Or %WS_MINIMIZEBOX Or %WS_MAXIMIZEBOX or %WS_THICKFRAME, 0 To hDlg

' -- Place controls here
CONTROL ADD label, hDlg, %lblCanvas, "", 5, 5, 310, 200
control set color hDlg, %lblCanvas, %BLACK, %BLACK
control set resize hDlg, %lblCanvas, 1, 1, 1, 1


CONTROL ADD BUTTON, hDlg, %btnClose, "Close", 255, 210, 60, 14
control set resize hDlg, %btnClose, 0, 1, 0, 1

CONTROL ADD BUTTON, hDlg, %btnSwitch, "Switch", 5, 210, 60, 14
control set resize hDlg, %btnSwitch, 1, 0, 0, 1

dialog set minsize hDlg, 320, 230
DIALOG SHOW MODAL hDlg, call dlgCallback

END FUNCTION


CALLBACK FUNCTION dlgCallback()
STATIC hCtrl as dword

SELECT CASE CBMSG

CASE %WM_INITDIALOG
DIALOG SET TIMER CBHNDL, %myTimer, %timeOut, %NULL
control handle cbhndl, %lblCanvas to hCtrl

' -- Init OpenGL
TBGL_BindCanvas(hCtrl)

TBGL_UseLighting %TRUE
TBGL_UseLightSource %GL_LIGHT0, %TRUE
TBGL_SetLightParameter %GL_LIGHT0, %TBGL_LIGHT_POSITION, 15, 10, 15, 1

CASE %WM_SIZE, %WM_SIZING
TBGL_UpdateCanvasProportions(hCtrl)
RenderMyImage(hCtrl)

CASE %WM_TIMER
RenderMyImage(hCtrl)

CASE %WM_CLOSE
TBGL_ReleaseCanvas(hCtrl)
DIALOG KILL TIMER CBHNDL, %myTimer

case %WM_COMMAND
SELECT CASE CBCTL

CASE %btnClose
if CBCTLMSG = %BN_CLICKED THEN DIALOG End CBHNDL

CASE %btnSwitch
if CBCTLMSG = %BN_CLICKED THEN Call Fan.eventSwitch(Fan)

END SELECT

END SELECT
END FUNCTION

FUNCTION RenderMyImage( hCtrl as dword )
if TBGL_CanvasBound(hCtrl) then

FrameRate = TBGL_GetFrameRate

TBGL_ClearFrame
TBGL_Camera 5, 5, 5, 0, 1.5, 0

Call Fan.eventPhysics(Fan)
Call Fan.eventRender(Fan)

TBGL_DrawFrame

end if
END FUNCTION


' -- Functions to manipulate fan
FUNCTION Fan_Switch( byref property AS tFan )
property.running = not property.running
END FUNCTION

FUNCTION Fan_Physics( property AS tFan )
if property.running then
property.speed += 90/FrameRate
if property.speed > 720 then property.speed = 720
else
property.speed -= 180/FrameRate
if property.speed < 0 then property.speed = 0
end if
property.angle += property.speed/FrameRate
END FUNCTION

FUNCTION Fan_Render( property AS tFan )
static i as long
tbgl_PushMatrix
tbgl_Color 255, 128, 0
' -- Base
tbgl_PushMatrix
tbgl_Scale 4, 0.5, 4
tbgl_Sphere 0.25
tbgl_PopMatrix

tbgl_Cylinder 0.125, 0.125, 2
tbgl_PushMatrix
tbgl_Translate 0, 2, 0
tbgl_Scale 0.5, 0.5, 1
tbgl_Sphere 1
tbgl_PopMatrix

' -- Fan
tbgl_Color 255, 255, 255
tbgl_PushMatrix
tbgl_Translate 0, 2, 0.5
tbgl_Rotate property.angle, 0, 0, 1
for i = 1 to 360 step 60
tbgl_PushMatrix
tbgl_Rotate i, 0, 0, 1
tbgl_Translate 0.75, 0, 0
tbgl_Rotate -45, 1, 0, 0
tbgl_Box 1, 0.3, 0.01
tbgl_PopMatrix
next
tbgl_PopMatrix
tbgl_PopMatrix
END FUNCTION

ErosOlmi
18-05-2009, 16:44
thanks for the idea but ...

;--) it's not going any better here instead it is making more hot because your script is using WHILE/WEND and my computer fan is going at its max while using ... (secret new timing weapon) it would slow down cpu fan and reduce hot air.

Petr Schreiber
18-05-2009, 16:57
You are right,

I changed code to use timer ... but what is that? - a wind from future ... it is dragging me to other topic (http://community.thinbasic.com/index.php?topic=2675.0) :shock:


Petr

Charles Pegge
18-05-2009, 18:36
Hi Eros & Petr,

51 deg 59 49.06 N 4 deg 58 40.57 W

This is the my dome frame on Google Earth. (2006) It does not resolve the struts but you can see a rounded structure.

I have dismantled it for refurbishment & transport some 100 metres distance to the school grounds,
when the weather improves!

51 deg 59 50.65 N 4 deg 58 43.77 W


Charles

Petr Schreiber
18-05-2009, 19:00
Thanks Charles,

that looks good!
I used Wolfram to convert coordinates from format you posted, it did some mod to '' part, but I think I finally found it:

Google maps (http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=%2B51%C2%B0+59%27+49.06%22,+-4%C2%B0+58%27+40.57%22&sll=51.994799,-4.977043&sspn=0.001163,0.002414&ie=UTF8&t=h&z=16&iwloc=A)
Microsoft maps (http://maps.live.com/default.aspx?v=2&FORM=LMLTCP&cp=51.996999~-4.977936&style=h&lvl=12&tilt=-90&dir=0&alt=-1000&phx=0&phy=0&phscl=1&where1=51%C2%B059'%2049.06%22N%2C%204%C2%B0%20%2058'%2040.57%22W&encType=1)

I think on MS maps it is maybe little better visible thanks to odd angle of camera :)

Petr

Charles Pegge
18-05-2009, 20:06
Hi Petr, that's the spot. I tried the maps and Google Earth. I found With GE you can zoom right in using the mouse wheel without getting odd angles. I have another dome at the back of the house close to the lane. it appears to be cuboid because it is recessed into the ground about 1.5 metres below the lane, and you can see 3 white blobs inside it which are builder's sacks, amongst other materials.

Amazing advance in detail since I last tried Google earth.


The photos 2 & 3 on this page show the ground level views of these structures. - blue links for more details.

http://www.pegge.net/realdome/list.htm

Charles