From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_ZEN_BLOCKED_OPENDNS,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.4 Received: from txout-a4-smtp.messagingengine.com (txout-a4-smtp.messagingengine.com [103.168.172.227]) by inbox.vuxu.org (Postfix) with ESMTP id BE93D2207D for ; Tue, 16 Dec 2025 15:45:23 +0100 (CET) Received: from localhost.localdomain (phl-topicbox-01.internal [10.202.2.219]) by mailtxout.phl.internal (Postfix) with ESMTP id 6FEC11C0177 for ; Tue, 16 Dec 2025 09:45:22 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lhAl8C0R header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=rodrigosloop@gmail.com smtp.helo=mail-ed1-f41.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:content-transfer-encoding :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1765896322; bh=I40eImDuWlyqbLvH G5u8ycN4jJ8hZm1+GluhmXkdPyg=; b=e3LFrwdVlWhlx36q5JNe/BzfTLdr+wKW Q7u/AwGPm/iOJln2QMiDcDHNcNeDezB26qUNYwEdAu2x3UAHYvbNs3KPvVtQeiOJ EXobpJacNjatXDArlu7ECaM8dxzZlia22jlsUUuhIaJgnH33YS2JK5o4vdizE/Yy Ex7z07mnZzY= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1765896322; b=NzOheUY+gsPLgwK8uDdQ9QoA9yY+zdA45hCzkvbRAmKqwb7sbE UGk6deKEinjw3ulQcKj2jG9M2rMFyik3thvwIxn24pDIGCR0Pm94K5OTRn7Nc6US TSFrEPJ5AqRweKVWDbCh6zRld8CBTnutnbKgRE2jK+Q2KFMgo0G/8VBL0= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lhAl8C0R header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=rodrigosloop@gmail.com smtp.helo=mail-ed1-f41.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: authmilter.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lhAl8C0R header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.208.41 (mail-ed1-f41.google.com); spf=pass smtp.mailfrom=rodrigosloop@gmail.com smtp.helo=mail-ed1-f41.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=flu6BZQ2; x-me-sender=none; x-ptr=pass smtp.helo=mail-ed1-f41.google.com policy.ptr=mail-ed1-f41.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.3 smtp.cipher=TLS_AES_128_GCM_SHA256 smtp.bits=128/128; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t=1765896322; x=1765982722; bh=CLPsH/yGPURE91hI1J7reCCX5ohl06i+ QOIsb5zIX9U=; b=gpISvoK/ZUl340F8bFd7MNBEcjvNJloyqxUa9KHMiRBtlxBV i26eUW2UmW0NU3RrkYQYqVsgyQbC1Gq0kq5FwDW4AoOSyc8hhVt/YDje0Oy/njqu LcvKKU8yZr2rFwwa9wJQNSmWth3bauJHOs0IBvKg8+feOy9m6CnyoWSvv4M= Received: from authmilter.topicbox.com (unknown [172.17.0.1]) by mx.topicbox.com (Postfix) with ESMTP id 0061B4D86406 for <9fans@9fans.net>; Tue, 16 Dec 2025 09:23:18 -0500 (EST) Received: from mx.topicbox.com (172.17.0.1 [172.17.0.1]) by authmilter.topicbox.com (Authentication Milter) with ESMTP id D59E9BB4786; Tue, 16 Dec 2025 09:23:17 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1765894997; b=itb9WTA+5Jho92PRHmK5HUnRPhDJgWrjVfKY69m4NQinjDNDK9 OZg3+jyqTtRV9RXLfetuVm75bBX42wdAlzzsfMrg+j0T1fWpQXpY1TADV1glvhqu /Le6a1OjvVZL/JQ7Lv5RFH49OD1XtSI2bjz5D6N2mYzmz4jP8afjMWFIN+D1mYf1 bKl649ouxvvtkCGEGUrBUS0+qdCf4f6RqV7JHJxdXRzMplXZ31ulZ4rBvHd8HvQ0 2A/EFHyMEemShdAbOAnp8p/dc6XCYCeIoMUpBld9psQfSTslKK45/Mhmqjl6kvtw 6n/M1qu8VqYwwF8OT3mBKkHxRY3SXxy3En6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:content-transfer-encoding; s=arcseal; t=1765894997; bh=nsPhf7yKXTfdPYVYoYo+XFVdBfYVgm4puqz LzVfG41I=; b=snFn1/SxiDpl9L05ofxoajg9tA7sEMaIuDJL99GFd0cbCdkRqj9 LP4JMZbqR9jqcjEY9AB7EsGnRpc4HWtwZnCZsYnLuPGqJ1Styxk/bxqVYW4TbmDd kA/3KkLfoUzFaoV0KJw2+bKGqLYiRSs1PDRkUsbCrKfi+FOBsn9PxTG2YjoerhL9 Ou2JlWQzZ+RK9w3uyHro6+QIYWsQ5U+tLCHFcmDUNLaw9xqXfiqFbPtCRpRr+113 WxVAd1+HDJOMSBbkY9gH1Pp5V5MnZtBgwfr7dHh010+3Hh7eifbIwZ4pDsS7gSF7 bpQI8LzXihiXhO7bW3sPADkKLYw2NoIoOEQ== ARC-Authentication-Results: i=1; authmilter.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lhAl8C0R header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.208.41 (mail-ed1-f41.google.com); spf=pass smtp.mailfrom=rodrigosloop@gmail.com smtp.helo=mail-ed1-f41.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=flu6BZQ2; x-me-sender=none; x-ptr=pass smtp.helo=mail-ed1-f41.google.com policy.ptr=mail-ed1-f41.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.3 smtp.cipher=TLS_AES_128_GCM_SHA256 smtp.bits=128/128; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefleeludcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepgghfjg fhfffkuffvtgfgsehtqhertddttdejnecuhfhrohhmpeftohgurhhighhoucfirdcunfpk phgviicuoehrohgurhhighhoshhlohhophesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhepjeeigfehueeftdegheekgeejueeutdehgeeljeelieeitdfhteeljeehfeev keeunecuffhomhgrihhnpehshhhithhhuhgsrdhushdpghhithhhuhgsrdgtohhmpdiggi hiihhvvhdrtghomhdpthhophhitggsohigrdgtohhmnecukfhppedvtdelrdekhedrvddt kedrgedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddtle drkeehrddvtdekrdeguddphhgvlhhopehmrghilhdqvgguuddqfheguddrghhoohhglhgv rdgtohhmpdhmrghilhhfrhhomhepoehrohgurhhighhoshhlohhophesghhmrghilhdrtg homheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepoeelfhgrnhhsseelfhgrnhhs rdhnvghtqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'rodrigosloop@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=authmilter.topicbox.com; identity=mailfrom; envelope-from="rodrigosloop@gmail.com"; helo=mail-ed1-f41.google.com; client-ip=209.85.208.41 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Tue, 16 Dec 2025 09:23:17 -0500 (EST) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-64981b544a1so6333408a12.1 for <9fans@9fans.net>; Tue, 16 Dec 2025 06:23:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765894996; x=1766499796; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nsPhf7yKXTfdPYVYoYo+XFVdBfYVgm4puqzLzVfG41I=; b=flu6BZQ2PVfoV/kgD40mq5Gb5E7oCAYZwSE2ydv3tfdDDhnysbJovGPTi6lmULB9XC rIyScG/O0kBINb4JViechna+GPzm37Se3VukWC0FUcr0tbRhYzOkhgZ31ZWwDR0aNqcB kcZr2xjhwCr0xdXhuzsVws+S5PNucznYW1gWzPHbTag6SkPZZqBKz3bJz8/CSDho1elt 3ibVtq3pflmoj+FH6p9g6jRdnqwsC7YCkLDVCYLnq/8HuWWm69W9MY9nS/oCWMqhMGCq 2dcTChDBmN9OEkV9ZaRj0IFnWhY8NG6DgCbVja5h4YpmU7H5yDXODVQnmX95rPqOvhAV /ZXw== X-Gm-Message-State: AOJu0YxrCmtjfRGfMvmrDceW1yO6kzyzdo9IV7EYbckkp8aYJP2YBeBP Wjqmkl1r36aiKhWI9kKs1DUDNuODsKfCPdk5Nqt8qKsuIclpO2+wLBQUKVsyZWQUcuMySMHHRem D+q+lyndgzlef8h/FD2V3+23NZL82M4Zt7l5r X-Gm-Gg: AY/fxX43wApywKrbUkQnvyDO2t44tftqOEYWgEoMzFHcLghkputUapaXsNSqW6GKacA 42ljSHejSk6NIgMQjozRB7RuzrUEr3jFwGiNaJ14zM+8i7zsLnf7jUiYwVWT6eQEKWpVn6DKfEt Q83S7mJZ1uJpHOgObjwC+e1uAjKaYNQYQqbtSd3InOGMxh5XuCe4Ou3myIFzNiIEQV8a3Y5A1yl TzZk7DTa1DLsO+dJJk7xm4LPfNQljSVvL5wvuaD1VsMfrekX3CxWAfYI++BZunNUiX97Ww= X-Google-Smtp-Source: AGHT+IGpyVU5ovm0I/vqUCmqfO/KKNt0XQlmP7Cnu1vpwFgAMLhuLjaiIXfNiv9BS7/gbTcHUYy3i/7UJQRVMEntbMQ= X-Received: by 2002:a05:6402:1464:b0:640:f1ea:8d1b with SMTP id 4fb4d7f45d1cf-6499b1b86d7mr13819349a12.16.1765894996144; Tue, 16 Dec 2025 06:23:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Rodrigo_G=2E_L=C3=B3pez?= Date: Tue, 16 Dec 2025 15:23:04 +0100 X-Gm-Features: AQt7F2omlCAEl-ZLgsgFmtz47GObVOL-Ay8Fr3k82c-bco1hITRAc3gEx1lagz0 Message-ID: Subject: Re: [9fans] Example for libgeometry To: 9fans <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: moderate: sender is a member; group holds all messages Topicbox-Message-UUID: c4a7d6f6-da8a-11f0-9dea-2f516bc11ef0 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZWNjNDU5YWIzNTBlZjliYy1NMzQ5ZjJhYjcxM2QyMzZmNWRjYmNh?= =?UTF-8?B?YmViPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M349f2ab713d236f5dcbcabeb:1:2Qpb9jR3Eq5mizGvYkLMWiPcY9jVpndOkokqnamX61I if you are using it in your own projects and find yourself implementing some procedures often, or if there's any issue or you have ideas about how to improve it, please let me know; directly or through the list. there aren't that many users and it'd be good to get more feedback. one of the things we want to do next is turn the structs and the Matrix3? types into unions, for example replace typedef double Matrix[3][3]; with typedef union Matrix Matrix; union Matrix { double m[3][3]; struct { double m00, m01, m02; double m10, m11, m12; double m20, m21, m22; }; }; to provide more options or naming flexibility. in the case of the Matrix it also simplifies things, because it being an array makes it inconsistent and a pain to work with (you find yourself doing a lot of memmove(2), it hides the fact that it's a pointer when passed to routines, ...). the thing is that this breaks the ability to use compound literals for quick construction, which are very handy. it seems there has been talk about adding support for that to the compilers, but it will take a while. in the meantime it'd be great to hear about alternatives. another thing that would be neat to incorporate is some form of geometric algebra. is anybody working on that? best regards, -rodri On Tue, Dec 16, 2025 at 5:09=E2=80=AFAM Skip Tavakkolian wrote: > > Thank you. That's good to know. I'll check it out. > > > > On Mon, Dec 15, 2025, 5:44=E2=80=AFAM Rodrigo G. L=C3=B3pez wrote: >> >> hi skip, >> >> we made improvements to the library for 9front some years ago, and i'm >> using it as the basis for some of my projects: >> >> - https://shithub.us/rodri/3dee/HEAD/info.html >> - https://shithub.us/rodri/libgraphics/HEAD/info.html >> >> it should have enough practical examples for many things. libgraphics >> implements a full 3d renderer, and on 3dee you'll find some tools to >> work with 3d files (OBJ, STL and the internal model(6) so far), along >> with a visualizer; it also includes a raymarching demo. >> >> notably, it's not the same interface as the old one, but we decided to >> make it more specific to geometry since the original one also embedded >> functionality related to graphics that would be better included in a >> different library. >> >> >> best regards, >> >> -rodri >> >> On Mon, Dec 15, 2025 at 3:23=E2=80=AFAM Skip Tavakkolian >> wrote: >> > >> > Hi all, >> > >> > In case anyone is interested, I've created an example [1] to display >> > and manipulate 3D objects using libgeometry (i.e. arith3(2), >> > matrix(2), qball(2)). If it is judged to be a good enough example, >> > perhaps it should be in /sys/src/libgeometry. >> > >> > I wasn't able to find any example usage of the libary in any of the >> > usual places, but I did find another implementation called moogle [2]. >> > >> > -Skip >> > >> > [1] https://github.com/9nut/plan9cmd/tree/main/examples >> > [2] https://wiki.xxiivv.com/site/moogle.html > > 9fans / 9fans / see discussions + participants + delivery options Permali= nk ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tecc459ab350ef9bc-M349f2= ab713d236f5dcbcabeb Delivery options: https://9fans.topicbox.com/groups/9fans/subscription