Asymptote, a TeX-based vector graphics system developed by John Bowman and Andy Hammerland starting in 2002, has evolved from 2D to 3D graphics through innovations including Bezier triangle patches, OpenGL/Vulkan rendering, and the new V3D format for embedding 3D scenes in PDFs. The V3D format addresses limitations of the legacy PRC format by supporting 3D transparency, vertex-dependent colors, and compressed vector graphics, enabling interactive 3D visualizations in mathematical presentations.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
TUG 2026—Sunday, July 19th, Part B
Added:I'll just say the illustrations are simple. Projecting them is more difficult.
>> Which button goes forward? Which button goes forward? The down goes up.
>> Yeah. Okay.
Okay.
I know we're all anxious to go see out the coffee break, but Jasper from I think you said you were pregnant.
That's correct.
almost local simple 3D illustrations in the tech ecosystem and as I've seen in the past while it may be simple in the tech connecting the computer to the projector does lend a few problems.
Thank you very much. Hello everybody.
Can everyone in the back hear me?
>> Awesome. Uh, before I get started, I just want to say a few remarks. Um, I want to say thank you for everyone who came. I want to say thank you for everyone who wasn't able to come but who was still part of our community. Thank you Boris and everyone else for hosting the YouTube. And if I know you through text exchange, hi.
Um, probably hold the remote. Um, yes.
And I wouldn't be here presenting at least if it weren't for Barbara's suggestion. So, thank you Barbara for suggesting this talk.
We're going to talk about simple illustrations in the tech ecosystems, specifically 3D ones.
Um, We're going to start with there are three sections. The first section has three subsections. Second section has two subsections. You can count. Um we're going to start with the overview. We're going to talk about the problem that I'm talking about. We're going to talk about why it's important. I'm also going to u explore a bit about why I chose LC as my platform being addressed. We are going to study something here called this is going to sound scary algebra.
We're going to motivate it though. We're not going to introduce it out of nowhere.
This diagram is made out of triangles.
Triangles are very special. Triangles are a type of simplex. Um a simplex is a line segment or a triangle.
Interesting very fascinating thing about line segments and triangles is that they are equivalent to in linear algebra where I like to call them a basis when they are not origin when they are when they have a point of origination that is not necessarily the origin. In linear algebra the origin doesn't matter in aine algebra the origin of a vector definitely matters.
Um, and so the cool thing about that is that when we represent a triangle as a basis, we can do a bunch of aine algebraic reasoning with it that lets us do 3D stuff. We will explore this as we go.
So I talked to you about something called the simplex basis correspondence.
That is what I like to call it. Every triangle is a basis. Every line segment is a basis. When I take the illustration of intersecting planes, I represent the triangles as bases and I use Jordan and their bases to find the intersection subspace.
We will get into that later. Triangles are bases and bases something called subace. A subace if a basis has two vectors out of a common point of origin. some space through that basis is the plane that's spanned by those two vectors. You have one vector out of that point. The the span of that basis is the line through that point in the direction of the vector. I hope that is clear for you guys. I'm very used to this stuff. Um we'll develop it intuitively. Uh is my plan too much.
My hope is to not overload you guys with charting.
I want to introduce every everything in terms of stuff that you can visualize in your head without any.
So that is this is a client bubble. You don't need to know the definition of a client bubble, but I'm sure we most of us know what bubble looks like.
Why is this important?
illustrations are everywhere.
Um the basic transformations when we deal with aline algebra we there are two important parts of it. There are aline operations such as addition subtraction dotproduct cross product. These are fancy terms. Addition and subtraction are valuable for navigation of bases of subspaces through bases because when we do that we take a linear combination or analy combination of the protruding vectors of the point of origination in order to in order to navigate the plane through state triangle.
There are also transformations in algebra which are different from the operations. A transformation is accomplished through matrix multiplication. In linear algebra we have matrix multiplications. Some of you who have taken linear alge will know what these are. Some of you also know what a transformations are. A transformations are linear transformations that include translation. So there are linear transformations that include translation because that is not included in linear algebra and that lets us do a lot of cool stuff in 3D as you can imagine because linear algebra gives you notations algebra gives you translations.
What am I doing right now? I'm rotating translating.
So, as I've mentioned, I'm going to drill this point home many times throughout this talk. A simplex is a basis.
When all of these triangles here, when I test when I do, this parametric function, I took a rectangular domain and mapped out to 3D, this function jumped up through the ceiling.
How did I stop that? I I I put an invisible bounding box, bounding cube of triangles around it and I partitioned them by these triangles.
The way I did that is I is I used something called Jordan on their bases because when you take Jordan, it's so cool. It lets you identify the intersections of two subspaces in linear algorithm.
Um and what that let me do is I was able to identify the line segments which spend the one dimensional subspaces through both the triangles of the green diagram and the triangles of the invisible bound. And then by extending those one-dimensional bases I was able to identify their intersections with their parent triangles and partition those triangles by those intersection points. Afterwards, I was able to remove everything above this diagram that would have gone straight up into the ceiling using a boolean filter and we get this cool little image. You can see how it turns into a perfect grid when we look at it up right. Um the opacity of plane is not that high so you do not see it occlusion too well but if you look closely here it is actually more gray there but probably not on this screen.
I believe I forget who suggested this diagram. I believe it was Barbara, but I might not be I I looked for the original citation and I could not find it. Um, parametric domains are often simplically.
Um, often times there are other ways to do it. There are other ways to illustrate parametric objects. I really like simplicities because well as I've described the intersection of two simplicities is a simplex and it always reduces down to operations and simplicities. It is very it's very nice.
So this picture is wrong.
Why is it wrong? Um, we did not identify the correct intersection points of the line segments composing the the gravity field and the intersections of them with the sphere. If we took the actual intersections, they would not be on the straight up triangles that comprise the sphere. It would actually be one unit away from the sphere to center which is not always true when you intersect a triangle which is on a tested sphere especially when you do it according to the cartisian product of domain sequence which is the way everyone does it these daysulation.
Why did I choose law techch as the platform? This is actually a really cool story. It goes back to a conversation I had with Max Chernov in the chat. Um, some of you were there for that. Um, so I used to think math animations were the coolest thing. Hands down. So I learned to text. Um, some of you who know me from text exchange will know that I've spent years posting about text on two accounts. I love illustrating. It is something that I just find so much joy.
This is not the animation in question.
We will see that one later. This is a stereographic projection of sphere. Um I think it looks cool. I love stereographic projections. Um it's very similar to the diagram that took 16 hours to render 24 frames of Yes. Um uh thanks to you, that same animation was well under 20 minutes in we will see that animation later. Isn't that amazing?
How does this work? I call it technical detail. Don't let that intimidate you.
We're going to do another friendly introduction to a algebra because sometimes you need to repeat yourself to get points across.
The 3D vector is a list of four numbers.
Most commonly the last number is one.
Projective algebra. you can change that to do perspective transformations that we're not dealing with that. Um the cool thing about an aine vector is unlike a linear vector its origin matters it really matters if if a if an a vector is here there extends a line through it here not over here that is very important for for navigating substases which is very important for doing things like partitioning and inclusion which we will get into in small detail as we go along. Important operations are addition, scalar multiplication, the dot product and cross productduct.
Addition and scaler multiplication enable navigation.
You take you add scalar multiples of vein vectors in a basis to navigate the subspace spanned by that basis. Just like algebra. So if you have two vectors pointing like this from common point of origin, you can traverse the plane through them using just them. It reduces down to Gordon and it is it is something I really enjoy at least.
Um the dot product across products are also very cool. The dot product gives us a means of reasoning about angles and projections and the dot product gives us a means of reasoning about orthogonality. For example, with dot product, I can tell you how far in specific direction normal to a vector relative to a to a vector something is without the dot product that would be very difficult. With the product, it comes immediately.
Cross product let us generate orthogonal vectors which are which point in perpendicular directions to one another.
that is useful for developing something called the northmal basis which is useful for a lot of things in algebra basis for a 3D line segment consists of two 3D aon vectors one of them is the origin one of them is not the other thing but the direction vector that points to it so if you had a line segment way to turn that into an a vector would be to Subtract the first point from the second point to turn the second point into a vector protruding from the first point to the second point while keeping the first vector fixed. That turns it into a base. They can also get turned back into a simplex. You don't need to do that enough bases and and for triangle a triangle is consists of three vectors.
One of them is the origin and two of them protrude from the origin.
You guys can see how poorly I ated down there. That's because I partitioned this triangle, so you won't see anything that was on this side of it. Um, yes, it does not look as good as the original, but it is better than the one that was there this morning.
Yes, for in this diagram actually we use inverse transformations to um normally depending on which perspective you take both valid you can decide to move the camera or move the objects relative to the camera. I like to move objects relative to the camera. So I I take the transformation that moves the camera there and I perform the opposite of it on everything else. It's called an inverse transformation and it's usually how cameras are achieved in graphics.
We use matrix multiplications to compose transformations and the homogeneous coordinate which is the number one at the end of the vector is what lets us do translations.
Translations are phenomenal to linear out there because it makes use for understanding reality. There are lots of nonlinear transformations that are useful. Transition and rotation are pretty fundamental to 3D graphics.
And as I've mentioned multiple times, elimination is used to determine the intersection sets of aine subspaces which are themselves a subspaces unless they don't exist. But if it does exist, it is enough in subspace. It reduces is beautiful simplicities reducing to problems of simplicities. Um you don't leave that class is something I very much like occlusion and partitioning.
I promise I'll keep it basic ordering in the system. The way we do it um is we project them. We project two ses in this case triangles. I'll treat it as triangles. This is a lot of people find that more intuitive. I would imagine you project them onto the viewing plate orthogonally. If they overlap at any point, you sort them by the depth of the inverse orthogonal projection of that overlap back onto both shapes. You have two points, one on each shape. You can order them by the depth using the dot product. And that is or in this case I I align it along the Z axis so I don't even need the product.
And for those of you who are wondering what this is, this diagram took me 16 hours to make in PGF math. 24 frames and multiple bugs along the way. It took a very long time to make. And this is the same one that took 20 less than 20 minutes by far to produce in Lua which is why I use Lua. Now simplicial partitioning is achieved through basis navigation and Gaus Jordan elimination. Gaus Jordan elimination will take two two bases and produce a subspace basis for them if it exists.
Otherwise, it'll produce a result that is recognizable to the computer as it does not exist. Uh it might have free variables or I forget the specifics. Um and the cool thing is we can navigate that subspace that that new subspace as a subspace. We get a basis out of this. So we can continue to navigate it the same way we've been navigating everything else. It's basically like steering a ship.
It's like driving.
Now, this is the big part of the talk.
This is the part that I really want to get a across to all of you. That's why I put it last. I think that um this would be of benefit to the community to hear.
Um there is a gap in parametric tessillation theory that I've noticed at least.
Um the gap is poor tessellation.
Specifically I am talking about domain restrictions and curvature. Um I express that in this form of language. Domain restrictions and curvature are the general way to put it though. Currently when we tessillate a domain take it for instance for a surface we will take a cartisian product of the of samples along both domain dimensions and then we will triangulate the resulting grid by cartisian product I mean we take two usually it's an arithmetic sequence sometimes it's not um and then we turn them into a giant grid of points based on those two sequences and then we triangulate those points. Um, this has problems with non-trivial illustrations. I would like to draw illustrations that I cannot draw because of this current technology. Um, I don't have any of those illustrations here today because I only wanted to show good diagrams, but if you're interested, talk to me later. I have a Stack Exchange post that has much worse diagrams that show the issue.
When we translate a surface domain, it neglects non-trivial it neglects features relating to domain restrictions and curvature most of the time.
And I I express that in terms of calculus terminology.
So I'm not going to propose a solution here. Um I'm not here to predict the future. I'm here to inspire you guys to try and fix this problem yourselves.
more creative minds focusing on the same thing. Let's overcome this.
So, I thought of some things that would likely be involved in a solution.
Not necessarily, but this is where my mind went. Instead of a generic grid, we would sample the domain for instance for a surface in this case for a surface based on its parametric properties. For instance, using castlike capabilities that would let us identify very specific regions in its domain where it is doing important things like inflection points or inflection regions if it's a multi if it's a surface. um it it could capture asmmptotes or domain restrictions and and the idea behind that the idea behind strategically sampling each of these phenomena is that when we go back later remember the picture of the green looks like Patrick Stars pants someone said um when when I removed those triangles on top so they wouldn't go all the way through the ceiling I did that using something called filtering using a boolean filter If we were to teslate the domain of a parametric object according to its features and not just a random arithmetic cartisian product of arithmetic sequences, we could go in and based on those features remove simplices that are too close to them or are beyond the boundary. That would be incredibly useful. that would allow us to avoid the as the asmtote problem not the software asmtote the the problem with singularities um and the problem of domain restrictions because not all domain restrictions are asmmptotes um but it would let us do that so the way I was thinking it might happen I'm not going to say this is how it's going to happen this is just where my mind went um the sample points in my theory would track the domain boundaries For instance, they would go around asmmptotes or if the asmtotes spanned a curve, they would go they would traverse around that curve and also along the asmtote. They would also traverse around domain restrictions and they would not just be adaptive but they would be deliberately chosen based on the parametric formula.
I don't want to reduce this down to just a problem of probability. I want to actually perform rigorous understanding of parametric surfaces using a computer so I can teslate them better. Um and it would capture regions of high curvature with more samples and in order to avoid wasting simplicities which lags our computer by a lot we would notate so much in areas where it is flat.
Currently, when we have a diagram that is if if let's say this floor was a plane. If if okay, I should probably be on camera, but um if we have a if we have a parametric surface that is really complicated in one area and not complicated in other areas, why are we wasting triangles in areas that we don't need to waste them in? That slows our computer down.
We should not do that.
I think it's like >> okay.
>> How am I doing for time?
>> I think you're running low.
I think you made the CPU overheat.
>> Well, I I'll talk about this diagram then. This diagram is something very special because we did something here to avoid a tessillation problem. This is a stereographic projection.
>> Okay.
>> I was listening.
I'll I'll describe it with the last one because they use the same feature.
Hopefully >> um this was included as I I don't know if you can add all text to animations.
I'm not familiar with that. Um >> I could you explain the how you >> Absolutely. I would be happy to after we described the last.
Um so this gets into a bit of more esoteric issue in sampling theory. I debated whether or not I should add it.
The animation was cool. Ed um intersecting curved surfaces almost always miss the exact regions of intersection when we teslate say for instance two spheres and we the result is not actually there but an approximation of it based on teslation um I was actually talking to Charles about this this morning and um apparently this is a well-known problem in computer um so Um what I would imagine would be the goal here would be to identify in order to prevent the need to partition later on points in the domain where they would map to intersection points and we would need to partition those intersection points because there would already be a partition. Um and this diagram is really special because it is a stereographic projection but as you can see none of the space is distorted. Normally when you deal with phobia transformations some places on the map get really big and some places get really small. It is it preserves comparity but it does not preserve distance. The cool thing about this parameterization is it's a parameterization of geographic projection that preserves distances. So circles not to circles under geometry and because of that you can parameterize them in terms of sign and cosine.
There's a theoretical way to prove it.
I'm not going to do that.
Um, I do not have a thank you. I said my dinkies at the beginning. Um, but as of course would like to know and I'd have to imagine other people maybe who like animations or maybe want to produce. How do I do this? Um, the way that I do this is create there are multiple ways, but the way I prefer to do it is I use a Tix picture in a standalone document with the Tix the Tix document class option and I usually add a small border around it or no border depending on the illustration. So I would have document class tix border equals 1 cm standalone and then I would use a for each loop on tix pictures because using the tix class option each tix picture will be a unique frame. Now that will still lead to problems with moving pictures because the frames will be different sizes. You need to use use as bounding box. Uh it is very fundamental to that flow. And then once you have the the sequence of 24 pages of PDF, in this case I I did something that I don't normally do. I I just in include animate graphic. I used the package animate to use the command animate graphics to include the PDF and that is animating the PDF. Normally what I do though is I produce GIFs or GIFs or however you like to pronounce it. I wouldn't judge anyone for how they pronounce that word because I don't know how to pronounce it. Um, when I do that, I I take the PDF and I use various software, be it image magic, a Python script, or a website to turn it into a GIF.
>> Thank you.
>> All right.
>> Well, I want to keep the duck up.
>> I I know we're running late.
>> Sorry about that.
>> And Boris has already had his question answered.
There are no other questions. We can go to the break.
>> Sorry for taking so long.
>> What?
>> Oh, >> oh, that was yours. Okay, >> that was >> Oh, you need this. I thought you were giving me a fist bump.
>> Cuz this is not going to work.
>> No, it's lagging.
>> No, it's this is messing with the sound.
Wait, let's hit the mute.
Testing. Testing.
Testing, testing.
Uh, let's make sure it's all right.
>> Are we starting or going to start?
>> Okay. Yeah.
>> All right, everyone.
We have saved the best for last because I see the announcements for another version of asmmptote come out on C10 on a regular basis >> and every once in a while I better go see what's changed >> and I suspect we'll learn more about what has changed. So let's welcome John Bowman from University of Alberta.
Past, present, and most importantly the future. Thank you.
Thank you. Um, can you all hear me at the back? I've got a lot of things to hold and I'm not sure I want to hold a microphone, too. So, okay. First, I want to acknowledge my collabor collaborators. Andy Hammerland was the uh one of my undergraduate students back in 2002. He came to me looking for a summer job and this is what came out of it is asimtote. So here we are um we um about uh about 25 years later and uh um another uh collaborator here is Charles Stats uh who's with us here today and he's contributed a lot of what I have to say in this talk and also the u software that was used to develop this talk uh was developed with my student Ben Bingham and also with AI. AI is what pushed it over in this last week to get for the first time of some of the features I'm going to show you available in a PDF. So, um, right. So, I, uh, the talk is posted here and, um, there's a QR code if you're close enough, you can take a picture of it. Anyway, um, so it began in 1978, but I guess the manual came out in 79 um, for tech and metaphon. In the beginning it all started with canoe and then um at that point the uh the companion to tech of course was the font generating program that was all done with bit maps and so now uh we of course we using much nicer looking fonts and that's due to the work of hobby he uh he realized the problem was really um figuring out how to pick control points for drawing nice smooth looking curves through through um some points that you specify that you want to uh use for making your fonts.
And um so he developed this concept of mock curvature. Um it was efficient. It could be solved with just a triangle solver.
And um that was very important back then. So they could very uh quickly um calculate these control points and um and then um they can be rendered by um by subdivision very efficiently. So um so that was for producing fonts at that point. But then in uh 1989, Hobby realized that uh he could if you can make nice fonts then well you could also make nice curves and do graphics. And so that was what began MetaP Metapost and Metapost is uh what inspired ASMTO because when Andy Hammerland came to me and looked for for the summer job I um I said well there is one thing I see there's this program Metapost I've been trying to uh it seems to be the best thing out there for the uh this vin diagram I wanted to produce and I wanted vector graphics that was one requirement and but I also wanted e numeric and of course these this software was all written before the ILE E standard back in 1978. It was before the ITE standard was was was a thing and um and so I wanted to modernize Metapost and I looked at the code and I thought it doesn't look like any way we could upgrade the numeric. It's too too based on tech. So I my decision was to go away from tech, use tech but um but redo the whole numeric. And Andy I I gave it to Andy and and asked him, well um take a look, maybe your opinion is different.
But he came back a few days later and he said, "Yeah, you're right. you were going to have to start from scratch. And so six months later, he read a book on compilers and uh and uh wrote his own um um compiler um for a virtual machine that um could produce a little straight line. And I thought, well, that's pretty cool, but how about, you know, let's make a sign curve or something. And and um well, he said, well, it can't do it yet because it doesn't know about sign, but uh let me type on your computer for a minute and hack hack hack. and he uh hooked it up to the the floatingoint sign um instruction and lo and behold we had a tiny little sine wave and that was the beginning of asmtope and then I was at a conference and I learned how to um overlay with tech um because this was just producing postcript at this point there was no tech involved at all but um and unlike the way it was done previously in metapost I diverged from the method that was used there I wanted to really use uh tech itself um And I didn't want to get him to uh write redo what Kuth did because he did an excellent job with type setting. And so let's not reinvent the wheel. Let's build on on that. And so as at that point was just a way of producing a tech file for you that would that would bring in with include graphics. It would or whatever we used back then EPSF or something. Um it would bring in um your your um your graphics and overlay interlace it with with tech and um um but that was all 2D. Then um in 2005, so this was our first public release. We started in 2002, but it wasn't released until then. It's the same time that Tix was released, and neither of us knew about each other's others projects. You know, otherwise, maybe there could have been some collaboration there. But we did really choose very different approaches to the problem. Um the fact that that we don't we didn't really build into the tech ecosystem. We just used it.
Okay, that gave us freedom to do more things. particularly when it came to doing 3D. So the trouble with 3D is first of all tech is a 2D program and um so um at the last the the last uh tug meeting I was at um back in 2010 I I um discussed uh I met John Hobby and and showed him uh what I was able to do and the difficulties I had um extending his algorithm um the same mock curvature algorithm but a generalization of it into 3D and there are some issues some parody issues that you have to deal with um and that's all in this this publication here. Um so um so that then gave us the ability to lift tech into 3D and um we wrote a OpenGL renderer and even figured out I had a student or shard who helped me figure out uh um how to um embed this in PDF using this legacy PRC format. And if I was giving this talk back then, that's what I would be using to show you 3D graphics.
Unfortunately, PRC I'm going to discuss is not a viable option anymore. And we need something else. And that's partly what this talk is about. So, um, another thing that happened shortly after that was uh um because the the labels in tech, even though I've lifted them to 3D, they're still planer. And if you rotate your your graph, you're going to view view viewing you'll be viewing those labels edgewise. and it's not going to look very nice. So, one of the uh important advances was um allowing those billboard labels to rotate um so that they always face the camera no matter how and you'll see examples of that um no matter what viewpoint you're looking at. Um and there were various uh 3D PDF enhancements which were done with uh with a colleague from Russia Miko Vidiv Vosovv uh and uh um and that's that's mentioned in this article um in another tugboat article. Um and another missing feature at that point that we added in with Bezier triangle patches.
Uh those are useful. The bezier triangle is a natural generalization of a triangle to 3D. Um then um a student who goes by the name of Jamie Rasame Masmuong. Um and uh he uh developed he independently um contributed a better rendering model than the fong blend model which I was using. I was just using the simplest model. He he uses this PBR based approach, more physics- based approach and also um uh image based lighting. I'll show you an example of that. and he helped me develop this uh WebGL um output format using um a JavaScript library that we wrote together. And uh and Jamie also helped me develop a replacement to the PRC format that I mentioned. It's a new format. I call it vector 3D, V3D, and it's compressed. Um it's it's even better compression uh than the PRC format. That was one of the big deals about PRC. The trouble with PRC is they one of the way they implement it, they implemented their own compression algorithm. There's good compression algorithms out there. I didn't have to reinvent the wheel. So, we used GZIP.
And um um also another thing that's been missing from 3D graphics up to this point. Um so five years ago I I finally uh implemented uh exact pixel perfect order independent transparency in 3D and that's really hard to achieve and to do it efficiently and the problem with transparency is what makes it so hard mathematically is that um the the blending operation that we use is nonassociative and it means you have to sort uh the fragments that get mapped to a pixel. you have to sort them um usually from back to front and uh you can't um interchange that order.
So although the with opaque objects the painters algorithm um allows you to graph um in OpenGL in an order independent manner that all breaks down when you have transparency and to do this correctly you need to be able to you need advanced hardware features of the GPUs. We all have those features but the software is kind of lagging and that's one of the problems as we'll see.
Um there have been a lot of language uh improvements um thanks to the work of Charles Stats. Um he introduced the templated imports um in the using and auto unravel keywords. I'll talk about those briefly. Um there's a a front end XAZI a graphical front end uh that's been upgraded recently to use QT6 and um and this collections library also introduced by Charles Stats. Um he put a lot of work into this. It's a massive project. There's an iterate iteration u facility with a iterator operator. Um you can now index um have user to find and index operators on your structures.
Uh he's got hashing.
Uh and the most uh recent thing we've done is a big thing um that I'm sure that Carl is looking forward to helping me with next year in the tech live release. We have transitioned over to Vulcan. Okay. and all the wonderful Vulcan libraries. We'll we'll have to be talking about that next year. Yeah. Um I deliberately saved this Vulcan transition until after the 26 release.
Yeah, I knew you would be happy. Um and um and then um what I'm using for this talk is this V3DAware plug uh PDF plugin which um we just uh put um we just got to get working this week. Okay, so it's very brand new. Okay, so uh for this it's used for this talk. Okay, so this is the um one of the the um important contributions. Um sometimes you want to import a module in asmtope. You want to write a generic module for different cases, different types. And you don't have you don't have to have different copies of that module and have to maintain different copies, one for each type. You know, maybe one for reals and one for ins, one for complex numbers or or whatever. Um or maybe it's a sorting algorithm or something. Um whatever. Um we wanted a way uh we we had some cluji ways of doing this before. So now we have an elegant robust way um that involves a um in your module you tell it that there are there's a generic type T and a generic type S and and another one called number and you can now um in when you actually go to import this module in the calling module in the calling in the parent file you can access it using um telling it what T is and what S is in this particular instance and um and Charles recommends you Can you you can call this module anything you want. You have to say as something. Um but um he recommends uh it's a good practice that you actually name the module with um some indication what these different types are because you may have more than one um access of a module with different types.
Okay. So this enables generic type- safe library code written entirely in asmtope.
And um we also just like C++ we added a using keyword um instead of a a type defaf and um it's just more convenient.
It's not so backwards like type defaf is and uh to many of us we always felt it was a little the type def is a little bit awkward and it actually is necessary in this language when you're referring to function types um in in in uh certain context you you need to uh use this type def. It's actually required. It's not just a convenience. This makes it a little easier. Um and there's also a new auto unravel feature which um is is quite convenient. It um what that does is if you have a say a a structure with a a member function an operator plus that operates on two of those those um those structures rational for example.
So this is an example of um a structure that that implements rational numbers and you want to add two rational numbers. uh if we didn't have this auto unravel key keyword um this would have to be declared outside of the structure and this way you can keep everything nice and self-contained and you can still access it outside the the auto unravel basically unravels this out of the structure so that the plus operator is now accessible wherever rational is used and so that's really nice and then Charles went on to develop all kinds of containers um to help us out with some um functionality that we were missing or it was very awkward to to uh to do these things before. And so this is a um a very very thorough um package they set up for doing uh hashmaps and and hashets, sorted sets, cues and uh also um native hashing of of ins, strings, reels and int arrays. They can be used as map keys. Um for example um so from his collections library you can access it's it sort of looks a bit like Python right I mean the the uh the from part right and um you're accessing um this module is key value hashmap um you can m access access it as this particular name again I'm following Charles's recommendation and um and then that's now a type that you can use and so we're going to the instance that type we're going to use is little h and um then we can Now um it's like a dictionary. We can assign to um various strings. We can assign um some integers four and two and then we can write them out and we get 42. Okay. So um another example you might be doing a frequency analysis on pets. See which are the most common pets. So you got a list of pets and um I didn't have room here for a long name so I just called my hashmap h. Um but um I um so I create an instance of that hashmap uh called accounts and I um I um can iter I can iterate on it and so I simply um increment uh for each um I go through this list for every pet I um keep it do a frequency analysis and so I know how many pets I have of each type and um and then we can graph it out. So this is just the code for producing this graph. And you see the cats win. There's three cats and two dogs and one bird.
Okay. So um another thing uh there are some iterator utilities. Zip and enumerate. Here's an example how you use zip. It just allows you to like a zipper um go back um join A with one and B with two and C with three. And um so we um we write them out here. So it's basically it's another way of doing key value pairs. Um but you can combine any any um two arrays this way. You can zip them together of the same type or different types.
So um and um also these uh these bracket operators if you suppose you define your own structure you might want to define what the what the bracket operator does on that structure. So that's quite convenient. Um we couldn't do things like this before. And so these are all um enhancements to the language. Okay.
Now I want to talk about what's been done on the rendering side. So um all the 3D work is based on basier surfaces and curves as well. Um so but most the most difficult part of the are the surfaces because you have to deal with occlusion and um and and and lighting and and subdivision cracks rendering all kinds of issues. Um so um we uh are the fundamental atoms of 3D graphics for asmtope are uh bezier triangles and patches.
So bezy triangles are the natural generalization of bezier curves to surfaces just as triangles are the natural generalization of straight lines to planer surfaces.
So the bezier triangles are curved and they also have a a one interior control point that you can use to to lift the interior up or down a little bit.
Um so they have a total of 10 control points. A basic triangle can be conveniently expressed in barentric coordinates.
By the way I'm talking about the cubic case here. Okay. It's the usual case that's used in in computer graphics.
We're using cubic splines. Okay. So bezier patches they're the they're the direct product of two such bezier um splines. Okay. Two bezier curves. It's the direct product and they're like the generalization of quadrilaterals to non-planer surfaces. Okay. Okay, so you got something like curved triangles and curved quadrilaterals. We call those um bezier triangles and bezier patches. Um here's a triangle and this is now uh done with um the new the new plugin that allows us to do have finally um back in 2010 even 28 2008 I could do this for my when I was teaching and I could um when I had surfaces of revolution in my calculus classes my students were on their laptops and they all had Adobe Reader and they could view this with Adobe Reader. Um but uh unfortunately uh Adobe Reader a few years later was no longer supported on the machines on the new machines the students had. They had tablets and phones and also Adobe Reader stopped supporting Linux and other other oss. So they still I guess support Windows and Mac OS but um but very few people seem to use them. More people are using things like Chrome browser and um and other other browsers out there. So um so it's great after all these years to finally um have this functionality that I in a PDF um presentation that I can do graphics without having to leave the presentation to another piece of software. So um um so let me just mention a few of the problems of this PRC.
It's it stood for product representat compact. It was a French product. They also had the the acronym preces because it was meant to be very compact and precise and um but the problem is it was only ever no one wrote a reader for it.
Uh we could have we wrote a writer and we could have turned all the write statements and read statements and made a reader for it but there's other problems too. Okay. Um it's the the also another big problem is Adobe Acrobat.
Even though it sort of worked, it wasn't adaptive. It was not vector graphics.
The initial mesh you got on loading was the mesh you got when you zoomed. It never got better. So that's not vector graphics. So um and it it had no 3D transparency. It didn't have vertex dependent colors which made everything look really really pixelated when you did scientific graphs and um no bezier triangle support. So I help used AI to help me prepare this talk and AI wanted an example of PRC. I says I can't put an example in. That's the whole problem.
That's the whole point of the talk.
I can't do it anymore. Um so we developed a new format called V3D and Vector 3D. It replaces this legacy format.
It um it's a a portable compressed vector graphics format for 3D scenes.
It's embeddible in PDFs and it's importable back into asmtote and um and it has 3D transparency. It has all the things I want. Vertex dependent colors. I basically put everything in that I want and we're on version two right now. Um it's a it's an integer. Um we're going to just keep incrementing the integer as as people submit new, you know, request new features. We can always extend it. Um it's has also some primitives built in which um are common primitives in in graphics that you can use in drawing.
For example, tubes are very useful if you want to draw a thick line. In OpenGL, you can only be sure of a a one pixel wide line be supported. There's that's all that the standard guarantees.
So if you want to draw anything more, you have to draw a surface around that one pixel line.
Uh also we support triangular groups which are useful for tessillation. And uh and also um curves in 3D and even pixels. Um so um as I said these uh these there's a bunch of viewers for these for V3D. We're working on getting more available, but one of them is astope itself. It can read its own files, which is always nice. And um and um there is a library for programmatic access to it. Um but the um the real tools that uh the real tool we're going to encourage people to use for the time being right now is Ocular. Um we've developed a plug-in for it and that's what I'm using today. And um so I will announce it soon once it's um completely stable. If it survives this talk, that's already a good sign. Um it hasn't crashed yet. Um so um there's also we've had for some time now, for a year or two, we've had this online JavaScript uh PDF viewer um that that can read V3D.
And uh so so that's another possibility.
You got to read that through a browser.
Um so here is an example of um I think I showed this in 2010. This u same same uh Whoops. Um, I forgot I can't zoom that way. Okay. When you zoom, you're scrolling the document. Uh, when when you use the mouse wheel, it scrolls the document. So, I I don't want to have contention between two. Normally zooming, normally the mouse wheel would zoom like that. But anyway, you can see um that I've really lifted tech into 3D.
And uh Donald K really was was impressed with this when I showed it to him that, you know, see his his work now in 3D.
And um so uh it was uh it was a lot of fun doing this. And um this is just a little um there used to be this package PS tricks. Anybody ever use it? Anyway, you don't need it anymore. There's there's better ways.
Okay. And here you see the billboard labels. Okay. And um um maybe I can zoom in a little bit so you can just see see them as they rotate. As we rotate around, you don't they don't disappear.
They're always facing the camera. And the other thing that's nice about this picture is that um there's no you don't see pixelization. Oh, sorry. Ah, I forget. I can't zoom like that. you you don't see pixelization. If I show if I showed this with Adobe Acrobat, you would see all all these square. You'd basically see the mesh and that's not good. So, underlying this, there is a mesh that I use to generate that. That's a 3D gamma function on the complex plane, by the way. And um and so along this this red um you're mapping a function from R2 to R2. It's a 3D graph.
The fourth dimension is use I use the color wheel. So red means real and uh RGB goes around the that gives you the phase of the complex number and I'm plotting the magnitude here versus the real and measuring parts and and the factorial is just along along along here. So you can see how this very good useful for teaching to be able to to do this. So that's the factorial right up up right right up there. Um the usual factorial along the real axis. Okay. So um this is the just showing you that we we've implemented transparency. Whoops.
And we yeah, we just got this working this week. And uh and AI did this for us. It was like a three-hour session with my student. Um and this is all local AI. I'll tell you about that more.
Here's another case where transparency is useful. There's a graph here. And you see there's some data that's above the plane and some's below. You still want to see the data, but you might want to um have um you be able to understand what's in front and what's what's behind the plane or above and below. Um here's a nice calculus problem. Um so uh there's an exercise afterwards you can calculate the surface area of the sphere that's that's inside the cylinder and that's a fun fun exercise and again we have transparency in that example. Um this is the the reman surface I mean the reman sphere and uh which shows you the projection um of the of the sphere onto the plane. It's a very nice way of understanding the the complex world that we live in. And um and Charles contributed this wonderful package for drawing smooth surfaces. It's just beautiful.
Yeah. So uh it's interesting how he how he uh did that and he used Bezier triangles uh once we had them available he updated his um his tessellation of this so that it makes use of both quads and triangles busy patches and triangles. Okay. So um like I said we we migrated from OpenGL to Vulcan and um but we didn't force people to have you don't have to use Vulcan if you don't have the library available there's a fallback to OpenGL okay so we dynamically load the OpenGL library um but um but eventually um I think forecially especially for Mac OS users they definitely want to get install the Vulcan library because otherwise they don't have transparency and that's because Mac OS basically deprecated ated OpenGL their OpenGL goes back to 2013 and they just froze it there and so all the new features that we need um the new feature we need is from 2013 and it's not in there and to have transparency so that is now available through the Vulcan um um using using um Molton on top of the the Apple Metal platform um this gives consistent rendering across all operating systems better GPU real u utilization and finally We um also I mentioned that we also um produce WebGL figures. So this is a way of embedding 3D figures directly in HTML and um it's using a JavaScript library that you either download from the network or you can embed it in a standalone file if you want offline access. And um in this way this brought asim tote not the program but the output to um tablets and phones but with a a a little bit of a drawback is there's no order independent transparency. So we have to solve this problem and um in order to do that we're going to have to migrate to web GPU. Um but here's a nice example that I just did recently. Um, I added the ability to do animations by specifying before you draw a surface, you can you can um enclose it in a transform, a begin transform and end transform. And this is a function that's going to map your your coordinates and time to another function um to a new new coordinate. So this is giving some aphline transformation here that we're doing. And here we're going to this is um that's the geometry transformation. There's also a color transformation. So you can change the depending on on the position and the color and the time you can um you can do something fancy and it leads to something like like this. So um let's click on that and see what happens.
Oh my I mean it's just craziness, right?
I just had lots of fun deconstructing the Utah teapot. Okay. All right. So um that's that example and uh and here's another example. It was contributed um by um an asmtope user who and uh who also contributed to the animation. Um he certainly um by asking good questions and even submitting patches uh he helped uh make this possible. So, um, and, uh, this is a robot. So, he's into, I guess he's a robotics engineer. And, uh, I don't know his real name, but his his, uh, handle is Azam Warrior. And, uh, you got this robot. You can move move it up. See, you can even you can even, uh, let's see, you can do that. And, and uh, what I want to do here then, okay. and then move it up and we can try to you know reach out and grab you or something.
Okay. So, all right. Um so that's fun for for educational purpose for sure.
And um as I mentioned we need to um improve on WebGL GP WebGL by um upgrading to WebGPU. So that's a project in the next um months. I'll be working on that and that will um give us access to um to the um the hardware features like um shader storage buffers um and um that are on GPUs SSBOs that we need and um and this will also improve the performance too on modern GPUs and it'll give us order independent transparency.
That's the main thing. Um, and another thing that uh that my former student Jamie did was this image based lighting.
Um, and I'll just show you an example here.
>> Isn't that cool? And uh and it's all interactive, too. You can you can move around here. Um, there we are. Yeah.
Isn't that cool? I Well, I look at that figure and uh to me it looks like Edmonton in the winter.
Okay. So, you got the snow and you got the evergreen trees. I think it was actually from Russia, but it's pretty much the same thing.
It's not the end of the world, Edmonton, but you can see it from there.
Okay. So, um yeah, as I mentioned, we also did a an upgrade of of QT of XAZI to QT6. Um that was necessary for compatibility with different distributions. And um and XAZI allows interactive eding of Azotope figures.
you can um you can modify existing objects, you can draw new objects and you can save those objects either as normal asmtote files or in another format that allows you to go and edit the objects that you created. So uh it kind of combines the best uh features of script driven and and uh graphical based methods of of uh figure creation. So it kind of marries these two approaches and um so just in summary of the what I've told you today there's some new language features templated imports most important one and uh the collections library um the the these uh new um more more the bracket indexing and things like that.
Sometimes these are you know syntactic sugar for things we could have done before but they're nicer looking. And um then um we've got the Vulcan port, um the WebGL, image based lighting, triangle patches, lots of things, a huge long list. I was surprised when I saw just how much that we've done in the last since I last spoke at at TUG back in 2010. And um yeah, and then this plugin we've used. And so in the future um well I don't have a long list here of of things uh to do but I'm sure that will I don't I can't predict the future but I'm sure there will be many things but I've already mentioned the webgu migration that's really important and um we would like to add animations just like we have that animation that was only on uh HTML. I'd like to have it in V3D. So I'm going to have to modify my V3D format to support animations. Maybe doing something similar. Um and here's the last one I've learned at this conference. the need to support accessibility. Now, how to do that in graphics is a real challenge. Um, but I'm certainly interested in hearing ideas about it. There was a project to try to add braille support for uh asmtote and I I should inquire what the status of that is. Okay. Um, but thanks so much for for listening and uh then um I hope that I'll have a chance to talk to you all at the banquet.
>> Thank you. Here by the way is um this is uh our logo and also on this page um this is the controller that I wrote for doing local um AI. I run uh this this talk was partially written by AI um on a 5090 um Nvidia 5090 card and using the the Quen 3.6 model which is really an awesome model as as uh Matthew was saying the other day. Um so you can you can uh get this controller from there. It does um agentic um um AI operations um in a sandbox on your local computer and uh it works much better than using chat JPT or Gemini or something. Um so you may want to try it out. Yeah.
>> Okay.
Now surely there's a question.
I'm looking at you Boris.
>> Boris always has a question. You can help us out, right?
I have only >> only a comment, right?
>> Yeah, I have a comment on chat and it's very short. It just says bravo.
>> Oh, you're welcome.
>> I think we have a question here.
>> Uh, so for the generic functions you added, there's no type inference there.
You have to manually name the function for each type. Um, so the um the generic functions, are you talking about the the using keyword?
>> Yeah. You have to specify this different name for every type. So you can't it can't just use type inference to figure out what you mean.
>> That's right.
>> Okay. Yeah. Yeah. Okay. Well, maybe Charles can answer that. Yeah. Yeah.
>> The functions can be automatically inferred >> the types based on what parameters you cast. Okay.
>> Yes, that's true. the the function can you can have one name for the function and there's no worry about name collision but um the type it has you have to that's magnetic you have to have um a different type uh well if you want to avoid name collisions you then you want to rename the type every time you import it with a different set of parameters uh in in a lot of languages like C++ they use angle brackets for that um I didn't want to try to add the new angle bracket syntax. So we use underscores incorporated into the type name. And if you if you really don't like underscores then you can make up your own convention and incorporate that into the type name.
>> Okay. Thank you.
>> Yeah.
>> I don't need the microphone >> for for the our online people. We need it. Yeah.
>> Hello. This is Jasper. Um my question is related to a module of asmtote that I am aware of um called smooth contour 3 which lets you plot implicit surfaces.
>> Yes.
>> Um I've seen that used to perform things that are very similar in my view to partitioning. I have a picture on my laptop here. I'll probably show it to you afterwards.
>> Sounds good. I was wondering if that same procedure with the um implicit surfaces such as the genus3 surface >> could be used to handle um more advanced partitioning features as they do in for example when you have a plane partitioned by a cube.
Um yeah well um one thing if you have a plane partitioned by a cube I think the best way to do that is at the pixel level and we actually have another thing I forgot to mention which should be on the future slide is an unfill operation which is a a project that's partially completed and um using AI I can probably again push this one to the over the across the finish line. So in 2D postcript does unfill um by whenever you draw a pixel it checks to see whether it's inside a particular bezier curve or not. We can do the same kind of thing in 3D. Um we have something um a prototype implemented but it uh still has a lot of problems but um that would be how I would try to do that particular problem.
But there are more general issues with intersecting surfaces and um so maybe Charles can speak to this because he wrote this wonderful package. I know he has ideas on how to do cropping.
>> I'm quoting Charles actually. Um I I'm quoting his sack exchange answer to my post from a while ago along probably from 2025 January.
>> Yeah.
So I don't know if Charles wants to comment more. Yeah. I think he would like to. Yeah.
>> Charles didn't want to give a talk. So I told him, I'll talk about all your work and then when I say something wrong, you can correct me and see it's working.
>> Okay. So, um I I do it's been on my to-do list for a long time to see if I can use these same sorts of techniques to yeah, as an alternative to uh John's approach with the unfilled to see if we can um truncate surfaces uh that aren't defined implicitly. Um, one of I sort of put that put that on the back burner because I was really frustrated about trying to do this sort of thing without a collections library.
So that's one of the reasons I went to the effort of creating a collections library is to make it easier to work on those sorts of things.
>> Well, we have something to look forward to. So that should also be on my future slide. Yeah. Okay. Yeah.
Uh did you also when you used OpenGL did you also use custom shader programs?
>> Yes. Yes. And uh uh I should say that was another thing that should have been on that list that that my former student Jamie did. He still uh they're still working with me part-time, but uh they're the ones who got me to move away from begin GL and NGL or whatever. you know those the old way of doing OpenGL to using the shaders and um so because we have the shaders now we can do wonderful things like the transparency everything that's done at the pixel level we can do it the unfill operation it opens up whole new approaches um so we've had that for a few years now maybe back four or five years yeah something like that >> and was it like a rasterizer implementation or deferred rendering >> um deferred rendering well that means something else I think an asmtope what we call deferred rendering um So um we we are we are rasterizing um but we're doing adaptively. Um so so first what we do is we turn bezier patches into triangles. We are wrote our own when I say we wrote our ren in-house renderer it's just for turning the patches into triangles. Once we have the triangles uh we give that to OpenGL and let that handle because it handles triangles well using the using the OpenGL shaders and those same shaders with some modifications worked in Vulcan too. And um they're also being used um in this talk here in we those same shaders are copied over to the plug-in as well. Yes.
>> Okay. Thank you.
>> Yeah.
>> All right. We'll thank our speaker one last time and now Eric will continue the program.
>> Okay. give you back.
>> Well, actually, I'm going to close it in a bit, but uh >> Okay, there's all your cables. Thank you so much for saying that.
>> Okay, so before I close the conference, uh you all are to be uh to remain seated. Uh however, we're going to close the the uh YouTube feed in a moment. So before closing, I would like to thank all talkers of today. Give them a great applause.
And yet another time for the conference committee of course.
So applause.
So I hereby close the conference and we'll give the mic to Colbury.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23