41223114

  • Home
    • SMap
    • reveal
    • blog
  • First
  • W1~W3(登入並設定筆記作業網站之密碼)
  • W2~W4
    • IPV4
    • IPV6
    • INFO
  • W5(初次嘗試gd繪圖,以三角函數波型圖為例)
  • w6(以gd繪圖嘗試各國之國旗繪製)
    • 中華民國國旗
    • 日本國旗
    • 美國國旗
    • gd繪圖之流程簡介
  • W9(嘗試遠端連結S1511)
  • W11(使用瀏覽器開啟國旗檔)
  • W13(開啟github倉儲)
  • putty使用
    • 步驟1
    • 步驟2
    • 步驟3
  • W15
    • Q1
  • experience
  • Brython
INFO << Previous Next >> w6(以gd繪圖嘗試各國之國旗繪製)

W5(初次嘗試gd繪圖,以三角函數波型圖為例)

三角函數波型圖程式
// 包含標準輸出入程式庫的標頭文件
// https://blog.csdn.net/weixin_38468077/article/details/101069365
// http://www.gnuplot.info/demo/
// https://github.com/sysprog21/rv32emu
// https://github.com/sysprog21/semu 
// https://docs.google.com/presentation/d/14N0cWG2SnBSqhc2cLF0_2VerB9FF8JN3
// https://cs61c.org/fa23/
// https://greenteapress.com/wp/think-python-2e/
// https://github.com/ecalvadi/c99-examples
// https://github.com/gouravthakur39/beginners-C-program-examples
// https://github.com/ergenekonyigit/Numerical-Analysis-Examples
// https://www.che.ncku.edu.tw/facultyweb/changct/html/teaching/CPPandMATLAB/Past/pdf%20Files/Chap02-Ling.pdf
// https://gteceducation.com.sg/Brochures/PROGRAMMING/C%20PROGRAMMING%20FULL.pdf
// https://jsommers.github.io/cbook/cbook.pdf
// https://jsommers.github.io/cbook/index.html
// http://student.itee.uq.edu.au/courses/csse2310/CProgrammingNotes.pdf
// http://cslibrary.stanford.edu/101/EssentialC.pdf
// https://publications.gbdirect.co.uk/c_book/
// https://www.fossil-scm.org/fossil-book/doc/2ndEdition/fossilbook.pdf
// ***** execute on replit 
// cd downloads
// cc gnuplot_ex1.c -o gnuplot_ex1
// ./gnuplot_ex1
#include <stdio.h>

// 主函式
int main() {
    // Start a Gnuplot process using popen
    FILE *gnuplotPipe = popen("gnuplot -persistent", "w");
    if (!gnuplotPipe) {
        fprintf(stderr, "Failed to start Gnuplot.\n");
        return 1;
    }

    // Use Gnuplot plotting commands, specify font and output as PNG
    fprintf(gnuplotPipe, "set terminal png font 'default,10' size 800,400\n");
    fprintf(gnuplotPipe, "set output './../images/gnuplot_ex1.png'\n");
    fprintf(gnuplotPipe, "plot sin(x)");
    // Close popen
    pclose(gnuplotPipe);

    return 0;
}



從資料庫抓取之程式:{ pkgs }: {
    deps = [
      pkgs.libev
      pkgs.gnuplot
      pkgs.ncurses.dev
      pkgs.gd
    ];
  env = {
    PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
      pkgs.libev
    ];
  };
}


INFO << Previous Next >> w6(以gd繪圖嘗試各國之國旗繪製)

Copyright © All rights reserved | This template is made with by Colorlib