This is a read-only mirror of pymolwiki.org
Difference between revisions of "Stereo ray"
Jump to navigation
Jump to search
(some rearrangements) |
|||
Line 6: | Line 6: | ||
}} | }} | ||
− | == | + | This scripts provides the [[stereo_ray]] command, which saves two ray traced images in PNG format. |
+ | The left image is rotated +3 degrees and the right image is rotated -3 degrees. | ||
+ | |||
+ | ''Note that the end result is almost identical to using "walleye" [[stereo]] mode, which might be more convenient and is readily available in PyMOL.'' | ||
+ | |||
+ | == Usage == | ||
+ | |||
+ | stereo_ray filename [, width [, height ]] | ||
+ | |||
+ | == Example == | ||
+ | |||
+ | <syntaxhighlight lang="python"> | ||
+ | import stereo_ray | ||
+ | stereo_ray output, 1000, 600 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | This will create two images, "output_l.png" and "output_r.png". Just paste the two images next to each other (in some image editing program) and you're done. | ||
+ | |||
[[Image:Stereo_ex_l.png|Left Image|200px|thumb|left]] | [[Image:Stereo_ex_l.png|Left Image|200px|thumb|left]] | ||
[[Image:Stereo_ex_r.png|Right Image|200px|thumb|right]] | [[Image:Stereo_ex_r.png|Right Image|200px|thumb|right]] | ||
Line 12: | Line 29: | ||
<br clear="all" /> | <br clear="all" /> | ||
− | To | + | == Manually == |
+ | |||
+ | To obtain the same result without the script, use the [[ray]] and the [[png]] command like this: | ||
− | |||
ray angle=+3 | ray angle=+3 | ||
png left-image.png | png left-image.png | ||
− | |||
ray angle=-3 | ray angle=-3 | ||
png right-image.png | png right-image.png | ||
− | + | Obtain almost the same result using the [[stereo]] command: | |
− | + | ||
− | png | + | stereo walleye |
+ | png combined.png, ray=1 | ||
− | == | + | == See Also == |
− | + | * [[stereo]] | |
− | + | * [[Stereo_Mode|stereo_mode]] | |
− | |||
− | |||
− | |||
− | |||
[[Category:Script_Library|Stereo Ray]] | [[Category:Script_Library|Stereo Ray]] | ||
[[Category:UI_Scripts]] | [[Category:UI_Scripts]] | ||
[[Category:Pymol-script-repo]] | [[Category:Pymol-script-repo]] | ||
+ | [[Category:Stereo]] |
Revision as of 15:49, 31 May 2012
Type | Python Script |
---|---|
Download | stereo_ray.py |
Author(s) | Jason Vertrees |
License | - |
This code has been put under version control in the project Pymol-script-repo |
This scripts provides the stereo_ray command, which saves two ray traced images in PNG format. The left image is rotated +3 degrees and the right image is rotated -3 degrees.
Note that the end result is almost identical to using "walleye" stereo mode, which might be more convenient and is readily available in PyMOL.
Usage
stereo_ray filename [, width [, height ]]
Example
import stereo_ray
stereo_ray output, 1000, 600
This will create two images, "output_l.png" and "output_r.png". Just paste the two images next to each other (in some image editing program) and you're done.
Manually
To obtain the same result without the script, use the ray and the png command like this:
ray angle=+3 png left-image.png ray angle=-3 png right-image.png
Obtain almost the same result using the stereo command:
stereo walleye png combined.png, ray=1