美文网首页
2021-03-17 小里程碑,汉字的立体显示

2021-03-17 小里程碑,汉字的立体显示

作者: hydro | 来源:发表于2021-03-17 17:31 被阅读0次

    数据库:SQLite(  需要下载 SQLiteStudio,绿色软件,解压即用。用来创建表格)

    语言:processing (  需要下载 squelized插件,用processing3.3菜单栏--工具--添加工具-库添加。这个插件用来读表格)

    字体:微软雅黑" (可以在程序中任意更换)

    程序:

    //////////////////////////////////////////////////////////////////////

    //xz平面图

    import samuelal.squelized.*;

    PFont myFont ;

        SQLConnection myConnection ;

      Table testTable ;

    //////////

    void setup()

      size(1280,1280,P3D);

      myFont = createFont("微软雅黑", 132) ;    

      textFont( myFont ) ;

      textSize(30);

      background(0,0,0);

    myConnection = new SQLiteConnection("jdbc:sqlite:K:/processing  &  sqlite/sketch_20210317ChineseChar/historyOfCCP.db");

    testTable = myConnection.getTable("timeAndMemo");

    }

    //////////

    void draw()

    {

      background(0);

    for (int j=0; j < testTable.getRowCount(); j++)    //for (TableRow row : testTable.rows()) 

      {

        text(testTable.getString(j, "DATA"),0-200,    130,j*150  );      

        text(testTable.getString(j, "Time"),300-200,  130, j*150 );      

      camera(-1200 + mouseX*3, -1400+ mouseY*3, 2200  ,      175, 950,  -600,                0, 1, 0 );  //coordinate for the eye,,,coordinate for the center of the scene,,,

      }

    }

    附件:historyOfCCP.db 需要用SQLiteStudio自建(略),然后放到与上述.pde文件同一个文件夹内。

    相关文章

      网友评论

          本文标题:2021-03-17 小里程碑,汉字的立体显示

          本文链接:https://www.haomeiwen.com/subject/vlyecltx.html