三维图表控件ecGraph3D的使用
By
admin
at 2019-12-22 • 0人收藏 • 2780人看过
昨天偶然发现一个3d的控件, 蛮不错的, 国外的, 需要注册, 下面连接分享了破解版
有需要的可以下载使用, 官方自带的例子是vb写的. 文档很全.
该ocx控件支持与鼠标交互, 放大缩小,拖拽,旋转
下面的动态图,因为gif录制软件的问题产生的绿底(这个不是控件产生的)




谁对这个控件感兴趣的给封装下(能在下面分享下您的封装库更好),哈
我这两天有事, 实在没人封装就等我过两天自己封装分享下了.
链接:https://pan.baidu.com/s/1cpuowoSgyWfLQMdnnAnHiA
提取码:9ukj
方便有些人没有百度网盘, 本地下载:
3 个回复 | 最后更新于 2019-12-24
示例二
这个控件可以免注册调用
import win.ui;
/*DSG{{*/
mainForm = win.form(text="aardio工程13";right=959;bottom=591)
mainForm.add(
button={cls="button";text="demo1";left=0;top=538;right=103;bottom=592;db=1;dl=1;z=2};
button2={cls="button";text="demo2";left=122;top=538;right=225;bottom=592;db=1;dl=1;z=3};
button3={cls="button";text="demo3";left=251;top=538;right=354;bottom=592;db=1;dl=1;z=4};
picturebox={cls="picturebox";left=0;top=0;right=960;bottom=492;db=1;dl=1;dr=1;dt=1;z=1}
)
/*}}*/
import console
console.open()
//免注册调用
import fsys;
import com.lite;
var dll = com.lite(fsys.appdata("aardio\ecGraph3D.ocx",$"\res\ecGraph3D.ocx"))
var ec3dG = dll.createEmbed(mainForm.picturebox,"{0EA4ABD6-7D38-4C8F-B976-D1CFDDA4525C}");
var ec3dObj = ec3dG._object;
ec3dObj.RegisterecGraph3D("XXXXX-XXXXX-XXXXX-XXXXX-XXXXX");
var demo2 = function(){
var nx,ny=8,8;
var i,j,x,y,z;
var zData = {};
var BarTooltips = {};
for(i=1;nx;1){
zData[i]={};
x = i/2;
for(j=1;ny;1){
y=j/2;
z = 2 * (math.sin(x) + math.sin(y) + math.random() - 0.5)
zData[i][j]=z
}
}
with ec3dObj{
Reset();
AddText("Demo 2. 3D bar graph, individual bar heights, legend table, custom tooltips & color scale.", 2, 2)
ClearColorBands();
AddColorBand(-4, 255, 255, "-4")
AddColorBand(0, 255, 65535, "0")
AddColorBand(5, 65535, 65280, "4")
AddLegendEntry("Positive", 3329330)
AddLegendEntry("Negative", 17919)
BarWidthX = 0.6
BarWidthY = 0.6
AddDataArray(nx-1, -4, 4, ny-1, -4, 4, zData)
Refresh();
}
}
/*示例1{{*/
var demo1 = function(){
with ec3dObj{
Reset();
AddText("Demo 1. Simple 3D math function as bar graph, colored by height.", 20, 2);
AddFunction("2*(sin(x)+sin(y))", 8, 1, 4, 8, 1, 4, -4);
Refresh();
}
}
/*}}*/
/*示例3{{*/
var demo3 = function(){
ec3dObj.Reset();
ec3dObj.AddText("Demo 7 - 3D surface function, mesh style, 60x60 resolution", 50, 2, , "bold", 1)
ec3dObj.PlotStyle = 3 //'PlotStyle: 0=waterfall, 1=slabs, 2=ribbons, 3=mesh, 4=columns
ec3dObj.RenderStyle = 1 //'RenderStyle: 0=Gradient, 1=solid, 2=wireframe, 3=axes only
ec3dObj.Skirt = 0 //'
ec3dObj.SetzColorTableStyle(93, 40, 1.4, 50, 0, "", 0)
ec3dObj.AddFunction("2*(sin(x)+sin(y))", 60, 1, 6, 60, 1, 6, -4)
ec3dObj.Refresh();
}
/*}}*/
demo1();
mainForm.button.oncommand = function(id,event){
demo1();
}
mainForm.button2.oncommand = function(id,event){
demo2();
}
mainForm.button3.oncommand = function(id,event){
demo3();
}
mainForm.show();
return win.loopMessage();
以上
三个示例完整工程代码如下:
登录后方可回帖
第一个示例:
import win.ui; /*DSG{{*/ mainForm = win.form(text="aardio工程13";right=959;bottom=591) mainForm.add( picturebox={cls="picturebox";left=0;top=0;right=960;bottom=448;db=1;dl=1;dr=1;dt=1;z=1} ) /*}}*/ var ec3dG = mainForm.picturebox.createEmbed("{0EA4ABD6-7D38-4C8F-B976-D1CFDDA4525C}"); var ec3dObj = ec3dG._object; ec3dObj.RegisterecGraph3D("XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"); var demo1 = function(){ with ec3dObj{ Reset(); AddText("Demo 1. Simple 3D math function as bar graph, colored by height.", 20, 2); AddFunction("2*(sin(x)+sin(y))", 8, 1, 4, 8, 1, 4, -4); Refresh(); } } demo1(); mainForm.show(); return win.loopMessage();