aroom
发表于 2012-5-28 07:44:30
cabinsummer 发表于 2012-5-28 06:26 static/image/common/back.gif
发邮件可以吗?
加QQ群,不是更简单吗?
aroom
发表于 2012-5-28 08:33:42
本帖最后由 aroom 于 2012-5-28 08:34 编辑
;;; 写个OpenGL的例子
(importAll "opengl32.dll")
(importAll "freeglut.dll")
(setq GL_COLOR_BUFFER_BIT0x00004000
GL_TRIANGLES 0x0004
GLUT_DOUBLE 0x0002
GLUT_SINGLE 0x0000
GLUT_RGB 0x0000
GLUT_RGBA 0x0000
PI (* (acos 0) 2)
rotx 0.0 roty 0.0)
(defun draw ()
(glClear GL_COLOR_BUFFER_BIT )
(glRotated rotx 0.0 1.0 0.0)
(glRotated roty 1.0 0.0 0.0)
(glutWireTeapot 0.5)
(glutSwapBuffers)
)
(defun rotation ()
(setq rotx (% (- (float rotx) .01) PI)
roty (% (- (float roty) .012) PI))
(sleep 30)
(glutPostRedisplay)
)
(defun keyboard (key x y)
(if (= (& key 0xFF) 27) (exit))
(println "key:" (& key 0xFF) " x:" x" y:" y)
(println "you press a key")
)
(defun mouse (button state x y)
(if (= state 0)
(glutIdleFunc 0) ; auto-motion off on button press
(progn
(println "you click mouse button")
(glutIdleFunc (callback 5 'rotation))) ; auto-motinn on
)
(println "button: " button " state:" state " x:" x " y:" y)
)
(defun motion (x y)
(setq rotx (* (/ 200.0 x) PI)
roty (* (/ 150.0 y) PI))
(glutPostRedisplay)
(println "x:" x" y:" y))
(defun main (argc argv)
(glutInit (address argc) (address argv))
(glutInitDisplayMode (| GLUT_RGB GLUT_DOUBLE ))
(glutInitWindowSize 800 600)
(glutInitWindowPosition 80 80)
(setq id (glutCreateWindow "算子语言调用OpenGL示例 - 拖动鼠标 - 按ESC键退出"))
(glClearColor (flt 0.5) (flt 0.3) (flt 0.3) (flt 0.0))
(glColor3d 1.0 0.85 0.35)
(glutDisplayFunc (callback 0 'draw))
(glutKeyboardFunc (callback 1 'keyboard))
(glutMouseFunc (callback 2 'mouse))
(glutMotionFunc (callback 3 'motion))
(glutIdleFunc (callback 4 'rotation))
(glutMainLoop)
)
(main 0 "")
梦醒才知原是梦
发表于 2012-5-28 08:45:02
不如在论坛上传一份
aroom
发表于 2012-5-28 11:23:44
本帖最后由 aroom 于 2012-8-23 12:46 编辑
【TeaScript软件下载】
【文件列表】
TeaScript.exe 算子脚本引擎(控制台界面)
TeaScript_w.exe 算子脚本引擎(图形界面链接库)
TSIDE.exe 算子语言程序设计开发环境(图形界面)
IDE.dll 用于加载IDE组件的动态链接库
更多源代码共享,请加入 TeaScript 算子编程交流QQ群:7326594 (已满), 255433035
更多详细介绍,请参阅近期出版的《算子》(Programming In TeaScript)一书。
zdqwy19
发表于 2012-5-28 11:46:12
aroom 发表于 2012-5-28 11:23 static/image/common/back.gif
不知道程序通用性如何,是否象lisp那样对各个版本cad的通用性那样。
aroom
发表于 2012-5-28 11:51:10
zdqwy19 发表于 2012-5-28 11:46 static/image/common/back.gif
不知道程序通用性如何,是否象lisp那样对各个版本cad的通用性那样。
支持 AutoCAD 2000 及 更高的各个版本
LLXXZZ
发表于 2012-5-28 12:41:16
等待教程............
梦醒才知原是梦
发表于 2012-5-28 14:17:24
aroom 发表于 2012-5-28 11:23 static/image/common/back.gif
梦醒才知原是梦 发表于 2012-5-28 08:45
多谢分享~~~~~~
不死猫
发表于 2012-5-28 19:52:40
本帖最后由 不死猫 于 2012-5-29 12:18 编辑
大家可以这样理解一下
这个类似COM接口什么语言都可以用的
这样就很清楚了。
qq229918602
发表于 2012-5-28 20:16:12
aroom 发表于 2012-5-27 22:52 static/image/common/back.gif
TeaScript不但可以扩展AutoCAD二次开发
还可以用 Lisp 来写windows 平台下的各种应用程序
听起来好强悍。。学习研究下。。感谢分享。
页:
1
2
[3]
4
5
6
7
8
9
10
11