duangsuse::Echo
712 subscribers
4.24K photos
127 videos
583 files
6.45K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
Forwarded from dnaugsuz
你们真没有做过绘制的人嘛
噢对,这里是 Python 群…… 基本都是后端或者框架使用者

能不能问一下绘制算法是 ys.forEach((y,x) => g.lineTo(x, h-h* y/yBounds )) 的情况下
x 轴(y=0) 的绘制点 y 如何定义
y 轴的又如何定义……

就连化 x 轴(y=y_func(vy+yzero) 其中 vy是y offset yzero 是y=0时z ,的方法都是我试出来的
而且中途还修了一个低级数据语义bug
哭死了
Forwarded from dnaugsuz
本来挂在频道指望有订户能私聊提几点
但是没人-_-||
看来自己的事只能自己做
dnaugsuz
你们真没有做过绘制的人嘛 噢对,这里是 Python 群…… 基本都是后端或者框架使用者 能不能问一下绘制算法是 ys.forEach((y,x) => g.lineTo(x, h-h* y/yBounds )) 的情况下 x 轴(y=0) 的绘制点 y 如何定义 y 轴的又如何定义…… 就连化 x 轴(y=y_func(vy+yzero) 其中 vy是y offset yzero 是y=0时z ,的方法都是我试出来的 而且中途还修了一个低级数据语义bug 哭死了
(其实是我根本没想好 with(window) { width, height } 和 x,y 的对应关系(
就增加一个「相对x轴」功能,默认关闭

嗯……刚才想了几个特性
首先是 Desmos 的跟踪函数曲线,这个比较简单, click 的时候 mouse 若有 y_func(x)==y ,把它高亮下,直到 mouseup 时显示 y_func(x) 就可以了
目前函数列表是没做的情况,做了估计要支持 enabled, color, expr 的编辑(是)

然后是缩放动画(补间函数可参考这个) 以及手动缩放钮,应该安排下, touchscreen 的 press 也没 handle
整个 navi panel 也不能最小化看整体图像,得做一下
Nivalis 的 variable slider 是很棒的设计, 有必要加一个

另外 dim2Cfg 这个配置对象,也应该给做个 modal dialog 的配置编辑器

隐式绘图 (画圆什么的) 可能优化的情况比较多,我也不了解代数符号系统那边什么情况,和 yuuta 一样,暂时只支持 x 变量
只能说 #math #cplusplus #js #web #tools 大佬 始终是大佬 ,而且 JVM 端大佬也不少
#Linux 系也有 KDE 的 KAlgebra 和普通工程计算器 KCalc
https://c3d.libretexts.org/CalcPlot3D/index.html 这还有个 3D 的
https://wiki.archlinux.org/index.php/List_of_applications/Science#Computer_algebra_system #listing
KDE 还指什么 Kernel Dense Estim. 的图 #lib #Python https://seaborn.pydata.org/index.html
#Math #dev https://www.geogebra.org/m/h9vhqujn 啊不得不承认虽然许多数学应用不开源(想必开源也无人维护,唉),但 本地化 #i18n 和无障碍访问性 做得是无可挑剔。 果然 #web HTML 虽然有些缺陷,却是最为成功的软件和文档平台
https://calcplot3dblog.wordpress.com/
[Mathway | About Us](https://www.mathway.com/about)
[Box and Whisker Plot Calculator](https://www.easycalculation.com/statistics/box-plot-grapher.php)
[CalcPlot3D](https://c3d.libretexts.org/CalcPlot3D/index.html) 不过有些人的 UI/UX 设计的确很难看...
#linux #Learn #Java #math #build #bash fix for Desoms (Kt, Java:Algebra)
1. Java Desmos 求解后端
git clone https://github.com/galbar07/Desmos.git DesmosJ &&cd DesmosJ
sed 's/import org.junit.jupiter.api.BeforeEach;//;s/@BeforeEach//;' -i tests/Functions_GUITest.java
javac -cp `ls JAR/gson-*.jar`:`ls ~/.m2/repository/junit/junit/4.0/junit-*.jar` ex1/*.java tests/Functions_GUITest.java
java -cp . ex1.StdDraw
#java -cp ".:`ls JAR -m|sed 's/, /:/g'`" tests.Functions_GUITest
java -cp `find JAR -type f -printf '%p:'`. tests.Functions_GUITest
因为 mvng 没有写完不能用脚本生成 POM 修复了 emm ,当然有 IDE 就能直接用(不过这年头 只会用 IDE 建项目 对细节一无所知的人真的有创造力吗 😑

2. Kotlin Desmos 简单重写
手动复制粘贴 https://paste.ubuntu.com/p/Q4DnzrZ37Z/ 或(源地址)到 Window.kt ,因为 国内 #China 许多地方不仅 #GitHub raw 连 pastebin 都连不上 🌚🌝 #freedom
mvn archetype:help
#mkdir DesmosKt &&cd DesmosKt
#mvn archetype:generate -DgroupId=com.example - DartifactId=desmos -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

mvn archetype:generate -DgroupId=me.nanjingchj -DartifactId=DesmosKt -DarchetypeArtifactId=kotlin-archetype-jvm -DarchetypeGroupId=org.jetbrains.kotlin -DarchetypeVersion=1.4.21 -DinteractiveMode=false
cd DesmosKt
mkdir -p src/main/kotlin/me/nanjingchj/desmos/
cat>`find -type d -name desmos`/Window.kt
mvnDeps=`python -c 'from lxml import etree,builder; s="org.mariuszgromada.math:MathParser.org-mXparser:4.4.2";E=builder.E;e=E("dependency", *(E(k, v) for v,k in zip(s.split(":"), "groupId artifactId version".split(" ")))); print(etree.tostring(e).decode())'`
sed "38i\ ${mvnDeps}" -i pom.xml
echo 'object Main{@JvmStatic fun main(vararg a:String){System.setProperty("sun.java2d.opengl","True"); me.nanjingchj.desmos.Window()} }'>`find -type d -name kotlin|head -n1`/Main.kt


然后 mvn package exec:java -Dexec.mainClass=Main 即可
感觉 maven 依赖这么多插件 archetype, install, exec 完成日常任务,有点不平衡吧……
此外还看到了生成本地文件依赖的 Maven #doc https://stackoverflow.com/questions/6704813/maven-generating-pom-file mvn install:install-file

#parser https://github.com/mariuszgromada/MathParser.org-mXparser 我草这玩意又不支持逆向计算,有啥好吹的
还夸张地弄了那么多图,太那啥了
http://scalarmath.org/wp-content/uploads/2019/01/scalar-promo-screens.png 弄个心型函数还要用户自己推导正向公式, 就凭这? 一个 evaluator 和 Python, JS eval 之类的东西有什么区别
不愧是 Java EE 搞出来的混乱怪物,就喜欢一些毫无意义的老套封装
duangsuse::Echo
计算机绘图,我该去哪里问?
《中国人什么时候能站起来》 迫真 🌝🇨🇳
不就画个图嘛,有什么不能在国内问的,居然都这么懂
Python 入门还都画 Turtle 呢,小学信息技术还用 Scratch 呢,草
#TeX #Python #math https://github.com/dwalone/Latex2Python/blob/master/latex2python.py#L75 🌚\frac{a}{b} 换成 (a/b)
作者也是挺机灵, findCloseParen(str)->int 是很方便的半解析做法
可是他重复了几遍 算 (i, i1) 再拿 i1 去算 i2 的操作,杂乱的 pos1, pos2 命名都没有注意到这是 zipWithNext 式处理,实现了个 findFCall(s)->str[] 函数……
列一些有趣的社区项目 #math #listing #Java
https://www.desmos.com/calculator/i6fijibmbz

#GUI 系列:
https://github.com/darsam44/Mini-desmos (吐嘈: 真的不迷你)
https://github.com/DanielZhangD/Javmos
https://github.com/LitterallyTheCoolestGuy69/Desmos-But-Scuffed

#Python 转换/等式代码生成脚本系列:
https://github.com/MrNewdary/svg2desmos/blob/main/svg2desmos.py
https://github.com/anematode/parametrizer/blob/master/undeletable.py
https://github.com/allesspassig/despy/blob/master/despy.py
https://github.com/emily-yu/image-to-desmos OpenCV #cv
#music https://github.com/AlexApps99/MIDI2Desmos 听 MIDI 函数图系列...

多项式课系列:
https://github.com/galbar07/Desmos
https://github.com/yonatan555/Desmos-Polynom
https://github.com/JiangTianXiang/Grade-12-Calculus-Graphing-Calculator
https://github.com/WhoIsKatie/Javmos
https://github.com/TimChoy/javmos
https://github.com/DvirTomer/Desmos-Polynom

乱入:
https://github.com/andrewpareles/Calculator/blob/master/main.ml
https://github.com/Tuttivers/ExponentialSeekbar-sample/blob/master/NearMeSeekBar.kt#L75 #Kotlin #Android
https://mukunthag.github.io/SHM/ 振荡器什么的...
https://github.com/Rob--/root-approximations/blob/master/evaluatex.js#L190 #JavaScript #lib #parsing 几百行的符号代数系统...

可移植性/项目管理极差的 GUI:
https://github.com/Pi-Man/Graphing-Calculator/tree/master/Graphing-Calculator
https://github.com/RohanK22/cppmathtool
http://well-made-territory.surge.sh/Desmos.html
https://github.com/softchickenidiot/3D-Grapher/tree/master/3D Grapher
#Android #meme #tech #China
<有什么好的实践方式简单检查用户是否是国内用户吗?
有个接口国内访问很慢,但是国外能够访问,所以想做个默认策略,在国外的直接调用接口,在国内走代理
>直接访问google

B: 一般都是靠 IP 库(
不过,ip库这种如果设置了代理检测不出来吧
#Math #meme #Haha 🌚🌝 傅立叶变换是什么 能吃吗
Forwarded from 荔枝木
来,开始隔空对线
https://drakeluce.com/projects/betterthandesmos/ #js 练手:给它加 navigation (当然由于没有任何可注入项 不可以移动图像)

window.onwheel=(ev,id=s=>document.getElementById(s)) => { if (ev.target.id!="btdCanvas")return; ev.preventDefault(); id("modifierZoom"+(id("combineZoom").checked?"":"Y") ).valueAsNumber+= -ev.deltaY; id("settingsForm").dispatchEvent(new Event("change")) };

嘛,作者的 individual Y zoom 写错了
🤔 这个抖动图怎么做啊 (误) 是指只用 Python 的话,函数和插值 怎么设计才可扩展呢