processing / processing/processing4

OpenGL strokeCap(ROUND) and strokeJoin should account for scale when computing the number of arc points

未关闭
#401 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

opengl
主要语言
Java
星标
494
派生
183
平均合并
4 小时 39 分钟
30 天内合并 PR
3

描述

Created by: scudly

The default renderer very smoothly supports zooming in on ROUND line endcaps and joins while maintaining their roundness. P2D and P3D, however, assume that any strokeWeight less than one won't have visible endcaps even when the scale factor blows them up to many pixels in size.

The following code runs fine with s = 600, i.e., no scaling. Change to s = 1, however, and the endcaps and joins disappear. Remove the P2D and both cases will stay smooth.

float s = 600;
void setup() {
  size( 600, 600, P2D );
  noFill();
  scale( height/s );
  strokeWeight( 0.2*s );
  point( 0.3*s, 0.3*s );
  strokeJoin( ROUND );
  beginShape();
  vertex( 0.6*s, 0.2*s );
  vertex( 0.8*s, 0.8*s );
  vertex( 0.2*s, 0.6*s );
  endShape();
}

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用 P2D 在 s = 600 和 s = 1 时运行提供的 sketch,然后在不使用 P2D 的情况下进行比较。跟踪 P2D 和 P3D 对 ROUND 描边端点和连接处的处理,重点关注弧线点数如何使用 strokeWeight 和 scale。完成标准是缩小后的描边仍保留可见且平滑的圆形端点和连接处。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
computer-graphics
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。