René's URL Explorer Experiment


Title: `shear_x()`, `shear_y()` and `apply_matrix()` draw the wrong shape · Issue #269 · processing/libprocessing · GitHub

Open Graph Title: `shear_x()`, `shear_y()` and `apply_matrix()` draw the wrong shape · Issue #269 · processing/libprocessing

X Title: `shear_x()`, `shear_y()` and `apply_matrix()` draw the wrong shape · Issue #269 · processing/libprocessing

Description: Shapes drawn under a shear come out as a rotated rectangle instead of a parallelogram. The same thing happens when a non-uniform scale() is followed by rotate(). Reproduction (processing-py) from processing_py import * def setup(): size(...

Open Graph Description: Shapes drawn under a shear come out as a rotated rectangle instead of a parallelogram. The same thing happens when a non-uniform scale() is followed by rotate(). Reproduction (processing-py) from p...

X Description: Shapes drawn under a shear come out as a rotated rectangle instead of a parallelogram. The same thing happens when a non-uniform scale() is followed by rotate(). Reproduction (processing-py) from p...

Opengraph URL: https://github.com/processing/libprocessing/issues/269

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`shear_x()`, `shear_y()` and `apply_matrix()` draw the wrong shape","articleBody":"Shapes drawn under a shear come out as a rotated rectangle instead of a parallelogram. The same thing happens when a non-uniform `scale()` is followed by `rotate()`.\n\n### Reproduction (processing-py)\n\n```python\nfrom processing_py import *\n\ndef setup():\n    size(400, 400)\n\ndef draw():\n    background(240)\n    translate(100, 100)\n    shear_x(PI / 6)\n    rect(0, 0, 150, 150)\n\nrun()\n```\n\n### Expected behavior\n\nA parallelogram leaning to the right, same as in Processing.\n\n### Actual behavior\n\nA rotated rectangle.\n\nIn the screenshot, blue is what libprocessing draws. Green is the correct shape. Red dots are what `screen_x()` / `screen_y()` return for the corners. They match the green shape, not the drawn one. The last panel (rotate, then scale) is drawn correctly.\n\n\u003cimg width=\"1200\" height=\"800\" alt=\"shear_2d\" src=\"https://github.com/user-attachments/assets/8a540121-c321-4f2d-aa66-f9d687524d7d\" />\n\nIt happens in 3D too. Here is `scale(1.6, 0.6, 1)` followed by `rotate_y()` on a box:\n\n\u003cimg width=\"800\" height=\"600\" alt=\"squashed_box_3d_overlay\" src=\"https://github.com/user-attachments/assets/02182f47-14ab-4c34-b43c-34f445cd0274\" />\n\n### Cause\n\nBefore each draw, the current matrix is turned into a Bevy `Transform` using `to_scale_rotation_translation()`. This happens in `spawn_mesh` in `render/mod.rs` and in `TransformStack::to_bevy_transform`. A `Transform` can only hold translation, rotation and scale. A shear doesn't fit, so it gets lost.\n\n`compute_global_transform` in `gltf.rs` does the same thing, so glTF scenes with a non-uniformly scaled parent are probably affected too.\n\n### Proposed fix\n\nWhen the matrix fits in a `Transform` keep the current path. When it doesn't, apply the matrix to the mesh vertices and normals and use a translation-only `Transform`. Existing sketches would render exactly the same. I would add unit tests and a visual test case.\n\nI would like to work on this if the approach sounds good.\n","author":{"url":"https://github.com/Akshats-git","@type":"Person","name":"Akshats-git"},"datePublished":"2026-11-11T17:39:13Z","url":"https://github.com/processing/libprocessing/issues/269"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:671707d9-e60c-45e2-2233-86df9829ff33
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC86C:2FDE44:1155DD:175CD2:6B05F765
html-safe-noncef84ab10c405ade742b8a746cee510a3cb369e45d5e6ed2813c03e8e82e13c7d8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODZDOjJGREU0NDoxMTU1REQ6MTc1Q0QyOjZCMDVGNzY1IiwidmlzaXRvcl9pZCI6IjYwOTkxNDE3NzU4OTU5NTEyMDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbaeb926d38d1d53d44d1715483eca71828db34e94c9a46a548e044396c30d3e0
hovercard-subject-tagissue:6333934926
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/processing/libprocessing/269/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e8c12a9150b447906250d276467e2f4ce4d25d2a129ccf1ab2baab9bfe2ac30c/processing/libprocessing/issues/269
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e8c12a9150b447906250d276467e2f4ce4d25d2a129ccf1ab2baab9bfe2ac30c/processing/libprocessing/issues/269
og:image:altShapes drawn under a shear come out as a rotated rectangle instead of a parallelogram. The same thing happens when a non-uniform scale() is followed by rotate(). Reproduction (processing-py) from p...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAkshats-git
hostnamegithub.com
expected-hostnamegithub.com
Nonec214754a6652274794ed4e054a7b71be999d69843f103ba54893001d45010ece
turbo-cache-controlno-preview
go-importgithub.com/processing/libprocessing git https://github.com/processing/libprocessing.git
octolytics-dimension-user_id1617169
octolytics-dimension-user_loginprocessing
octolytics-dimension-repository_id1101329545
octolytics-dimension-repository_nwoprocessing/libprocessing
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1101329545
octolytics-dimension-repository_network_root_nwoprocessing/libprocessing
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7d164a4e71eb333b2b17fd5b17e18efb7855505c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/processing/libprocessing/issues/269#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprocessing%2Flibprocessing%2Fissues%2F269
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprocessing%2Flibprocessing%2Fissues%2F269
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=processing%2Flibprocessing
Reloadhttps://github.com/processing/libprocessing/issues/269
Reloadhttps://github.com/processing/libprocessing/issues/269
Reloadhttps://github.com/processing/libprocessing/issues/269
processinghttps://github.com/processing
libprocessinghttps://github.com/processing/libprocessing
Codehttps://github.com/processing/libprocessing
Issues67 (67)https://github.com/processing/libprocessing/issues
Pull requests10 (10)https://github.com/processing/libprocessing/pulls
Actionshttps://github.com/processing/libprocessing/actions
Projectshttps://github.com/processing/libprocessing/projects
Wikihttps://github.com/processing/libprocessing/wiki
Security and qualityhttps://github.com/processing/libprocessing/security
Insightshttps://github.com/processing/libprocessing/insights
https://github.com/processing/libprocessing
New issuehttps://github.com/login?return_to=https://github.com/processing/libprocessing/issues/269
New issuehttps://github.com/login?return_to=https://github.com/processing/libprocessing/issues/269
shear_x(), shear_y() and apply_matrix() draw the wrong shapehttps://github.com/processing/libprocessing/issues/269#top
https://github.com/Akshats-git
Akshats-githttps://github.com/Akshats-git
on Nov 11, 2026https://github.com/processing/libprocessing/issues/269#issue-6333934926
https://private-user-images.githubusercontent.com/153976020/702601168-8a540121-c321-4f2d-aa66-f9d687524d7d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJna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bD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMTI0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTEyNFQyMDQ1MjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZmFlN2Y3NWJlNjA4MDA3MTQ4ZDc0YmE0NDg0NTZkMDIyY2JmOGU1NjcwNzRmZjI4NTY0Yzk0NTM0MzgzOGIyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.Lo9qgNrrxLfPVoHPMnZR6oh8TsurrlPFee7gXH1bBzM
Sign up for freehttps://github.com/signup?return_to=https://github.com/processing/libprocessing/issues/269
Sign in to commenthttps://github.com/login?return_to=https://github.com/processing/libprocessing/issues/269
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.