# Tag Info

## New answers tagged asymptote

### How to draw line parallel to a line and tangent to a circle?

Tangent to a circle: with given direction One more Asymptote solution, additional to Thurston's answer. First time I learn that length (or time) of a circle is 4. // tangent to a circle: with given ...
• 15.2k

### Assuming a line is tangent to a circle in tkz-euclide

Sometimes drawing can be done by going back from the conclusion of the mathematical problem. In drawing for this geometry problem, we start with a point A on the circle (O,R), then choose P and Q such ...
• 15.2k

### Drawing an eighth of a sphere in tikz

For a reference, in Asymptote, we can use 1st way: built-in octant1 is the first 8th surface of the sphere, and can be drawn with draw(octant1,yellow); 2nd way: parametric equations of the sphere ...
• 15.2k
Accepted

### Drawing an eighth of a sphere in tikz

With the tikz-3dplot package, you can easily rotate the planes which facilitates drawing. But actually, you just need to draw three quarter circles on the three planes (xy, xz and yz) and shade them ...
• 24.4k

### How to draw a double napped cone with TikZ

An Asymptote solution for fun! I have not cleaned my code yet. Without opacity (opacity(1)) With opacity(.5) // http://asymptote.ualberta.ca/ import graph3; currentprojection=orthographic(2,2,.5,...
• 15.2k
Accepted

### no matching function 'operator *(transform, void)'

You may note the difference between function label() and object label and how function rotate() relates to them. In particular, the signature of label() is void label(Label L, triple position); which ...
• 3,555

### Drawing a Plane in 3D space

An Asymptote answer for an old question. Here p=plane(A,B) is the plane (parallelogram) O--A--A+B--B--cycle that we can fill the inside draw(surface(p),magenta+opacity(.2)); and draw the boundary ...
• 15.2k
1 vote

### What is the correct way to load in asymptote a bitmap image with precise scaling?

The main thing to know is that labels are not scaled by the size and unitsize commands. For example, I have modified your code below to show that a 7cm label is the same width as the grid that you ...
• 4,507
Accepted

### Vector Field in Metapost

New: There are 3 kinds of phase portraits: slope field, direction field, vector field. In this situation, I choose direction field with normalized length of the vectors (in my taste ^^, that is .1*...
• 15.2k

### Vector Field in Metapost

I am not sure whether this is what you want, but you could do the following using Metapost: s := 1.5cm ; vardef u(expr x,y) = (y+x*x-0.25*x*(y-1+2*x*x)) enddef ; vardef v(expr x,y) = (-2*x*(1+y)) ...
• 24.4k
Accepted

### Draw a 3D solenoid using tikz

This is an Asymptote solution with the module tube. I choose brown+gray for the color of the copper string. Feel free to change to another color, for example https://colorcodes.io/brown/copper-color-...
• 15.2k
Accepted

### How to pass code to asymptote from the command line?

I would recommend defining i before usersetting(): int i; usersetting(); write(i); That way the user can enter either asy asyfile -u i=5 or asy asyfile on the command line.
• 802