Coder Social home page Coder Social logo

Comments (8)

charlesstaats avatar charlesstaats commented on July 19, 2024

The way TeXHead2 (and other ArrowHeads2) work is to literally draw 3d paths (or surfaces) approximating an arrowhead. It's not going to look good when the arrow is pointed toward or away from the camera (as in your example), but it will look okay when the arrow is pointed roughly perpendicular to the camera. Also it will look bad if you have interactive rotation.

The "good" appearance with the eps rendering is the actual bug here.

(Now, perhaps it would be nice to be able to specify an arrowhead that doesn't rotate, as in the eps version. But that's a feature request, not a bug report.)

from asymptote.

Doeme avatar Doeme commented on July 19, 2024

Ah, yes, I see. I guess manual billboarding (i.e. EndArrow3(TeXHead2(normal=cameranormal))) would yield the better looking behaviour.

Also, I changed the title to match the actual bug.

from asymptote.

Doeme avatar Doeme commented on July 19, 2024

When I rerun the test (modifying it to include settings.render=0, which I guess has not been necessary before), the problem seems to be still there.

With settings.render=10, it is fine though.

from asymptote.

johncbowman avatar johncbowman commented on July 19, 2024

Perhaps you are asking that TeXHead2 be drawn with billboard interaction (like labels)?
But which way should the arrowhead point when the stem is pointed directly at you?

If you want to interactively rotate the 3D diagram, you should use a proper 3D Arrowhead.

from asymptote.

Doeme avatar Doeme commented on July 19, 2024

The "good" appearance with the eps rendering is the actual bug here.

Should I open up a new bug? I changed the bug title to match the actual bug, but if that is insufficient I'll happily open up a new one.

from asymptote.

johncbowman avatar johncbowman commented on July 19, 2024

I don't think there is a bug here but I think I found what is confusing you. You are comparing a
3D interactive vector (PRC) pdf file (with a vector preview of the 3D scene) to a 2D (flattened) eps file.

Here is how to get consistent 2D (flattened) output for eps and pdf:

asy -V test -f eps -render=0
asy -V test -f pdf -render=0 -noprc

PDF is a special case because by default (without -noprc) 3D PRC content gets embedded, with a matching preview image.

If you view your test.pdf file with Acrobat Reader and click on it to activate it, you will see that the preview image must appear as it is in order to match the 3D content.

from asymptote.

Doeme avatar Doeme commented on July 19, 2024

Ah, yes, in deed, you're right. Setting -noprc results in the same output on both eps and pdf.

Yet, this still leaves a discrepancy between -render=0 and -render=10.

Render 0

render0

Render 10

render10

from asymptote.

johncbowman avatar johncbowman commented on July 19, 2024

See the discussion about render=0 throughout the manual. It is intended as a rough attempt to flatten a 3D scene to a 2D vector format (without rendering) and is far from complete (for example, no hidden surface removal). Try using render=0 on the teapot example and you will see that this option is not intended for general use.

from asymptote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.