\begin{pspicture}(-0.5,-0.5)(2.5,1.5)
\psdots(0,0)(2,0)(1,1)
\end{pspicture}
The document discusses using the PSTricks package to draw graphics in LaTeX. It begins by explaining how PSTricks uses coordinate pairs to specify points, with the default axes being the current text position. It then demonstrates how to draw single dots with \psdots and multiple dots by listing coordinate pairs. Enclosing the graphics in a \begin{pspicture} environment ensures space is reserved. Line segments can be drawn with \psline, and linestyle options like dashed and dotted
The document discusses various techniques for image compression including:
- Run-length coding which encodes repeating pixel values and their lengths.
- Difference coding which encodes the differences between pixel values.
- Block truncation coding which divides images into blocks and assigns codewords.
- Predictive coding which predicts pixel values from neighbors and encodes differences.
Reversible compression allows exact reconstruction while lossy compression sacrifices some information for higher compression but images remain visually similar. Combining techniques can achieve even higher compression ratios.
The document discusses various techniques for image compression. It describes how image compression aims to reduce redundant data in images to decrease file size for storage and transmission. It discusses different types of redundancy like coding, inter-pixel, and psychovisual redundancy that compression algorithms target. Common compression techniques described include transform coding, predictive coding, Huffman coding, and Lempel-Ziv-Welch (LZW) coding. Key aspects like compression ratio, mean bit rate, objective and subjective quality metrics are also covered.
This document summarizes image compression techniques. It discusses:
1) The goal of image compression is to reduce the amount of data required to represent a digital image while preserving as much information as possible.
2) There are three main types of data redundancy in images - coding, interpixel, and psychovisual - and compression aims to reduce one or more of these.
3) Popular lossless compression techniques, like Run Length Encoding and Huffman coding, exploit coding and interpixel redundancies. Lossy techniques introduce controlled loss for further compression.
I am Andrew O. I am a Computer Science Assignment Help Expert at programminghomeworkhelp.com. I hold a Ph.D. in Programming, Southampton, UK. I have been helping students with their homework for the past 10 years. I solve assignments related to Computer Science.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Computer Science assignments.
This document provides an overview of data compression techniques. It discusses lossless compression algorithms like Huffman encoding and LZW encoding which allow for exact reconstruction of the original data. It also discusses lossy compression techniques like JPEG and MPEG which allow for approximate reconstruction for images and video in order to achieve higher compression rates. JPEG divides images into 8x8 blocks and applies discrete cosine transform, quantization, and run length encoding. MPEG spatially compresses each video frame using JPEG and temporally compresses frames by removing redundant frames.
This document summarizes a lecture on entropy coding and discusses Hoffman coding and Golomb coding. It begins with an overview of entropy, conditional entropy, and mutual information. It then explains Hoffman coding by describing the Hoffman coding procedure and properties like optimality. Golomb coding is also summarized, including the Golomb code construction and its advantages over unary coding. Implementation details are provided for Golomb encoding and decoding.
The document discusses various techniques for image compression including:
- Run-length coding which encodes repeating pixel values and their lengths.
- Difference coding which encodes the differences between pixel values.
- Block truncation coding which divides images into blocks and assigns codewords.
- Predictive coding which predicts pixel values from neighbors and encodes differences.
Reversible compression allows exact reconstruction while lossy compression sacrifices some information for higher compression but images remain visually similar. Combining techniques can achieve even higher compression ratios.
The document discusses various techniques for image compression. It describes how image compression aims to reduce redundant data in images to decrease file size for storage and transmission. It discusses different types of redundancy like coding, inter-pixel, and psychovisual redundancy that compression algorithms target. Common compression techniques described include transform coding, predictive coding, Huffman coding, and Lempel-Ziv-Welch (LZW) coding. Key aspects like compression ratio, mean bit rate, objective and subjective quality metrics are also covered.
This document summarizes image compression techniques. It discusses:
1) The goal of image compression is to reduce the amount of data required to represent a digital image while preserving as much information as possible.
2) There are three main types of data redundancy in images - coding, interpixel, and psychovisual - and compression aims to reduce one or more of these.
3) Popular lossless compression techniques, like Run Length Encoding and Huffman coding, exploit coding and interpixel redundancies. Lossy techniques introduce controlled loss for further compression.
I am Andrew O. I am a Computer Science Assignment Help Expert at programminghomeworkhelp.com. I hold a Ph.D. in Programming, Southampton, UK. I have been helping students with their homework for the past 10 years. I solve assignments related to Computer Science.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Computer Science assignments.
This document provides an overview of data compression techniques. It discusses lossless compression algorithms like Huffman encoding and LZW encoding which allow for exact reconstruction of the original data. It also discusses lossy compression techniques like JPEG and MPEG which allow for approximate reconstruction for images and video in order to achieve higher compression rates. JPEG divides images into 8x8 blocks and applies discrete cosine transform, quantization, and run length encoding. MPEG spatially compresses each video frame using JPEG and temporally compresses frames by removing redundant frames.
This document summarizes a lecture on entropy coding and discusses Hoffman coding and Golomb coding. It begins with an overview of entropy, conditional entropy, and mutual information. It then explains Hoffman coding by describing the Hoffman coding procedure and properties like optimality. Golomb coding is also summarized, including the Golomb code construction and its advantages over unary coding. Implementation details are provided for Golomb encoding and decoding.
This document summarizes research on optimizing the LZ77 data compression algorithm. The researchers present a method to improve LZ77 compression by using variable triplet sizes instead of fixed sizes. Specifically, when the offset is equal to the match length, they represent it with a "doublet" of just length and next symbol, saving bits compared to the standard triplet representation. They show this optimization achieves higher compression ratios than the conventional LZ77 algorithm in experiments. The decoding process is made slightly more complex to identify doublets versus triplets but still allows decompressing the encoded data back to the original.
I am Boris M. I am a Computer Science Assignment Help Expert at programminghomeworkhelp.com. I hold MSc. in Programming, McGill University, Canada. I have been helping students with their homework for the past 7 years. I solve assignments related to Computer Science.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Computer Science assignments.
The document provides information on various techniques for image compression, including lossless and lossy compression methods. For lossless compression, it describes run-length encoding, entropy coding, and area coding. For lossy compression it discusses reducing the color space, chroma subsampling, and transform coding using DCT and wavelets. It also covers segmentation/approximation methods, spline interpolation, fractal coding, and bit allocation techniques for optimal compression.
This document provides an overview of common image compression techniques. It discusses why images are compressed, how compression reduces redundancy in images, and the general flow of image compression systems. It describes lossy compression methods like discrete cosine transform and discrete wavelet transform that reduce pixel correlation. Lossless compression techniques including quantization, Huffman coding, arithmetic coding and run length coding are also covered. Popular image compression algorithms like JPEG, JPEG 2000 and shape-adaptive compression are briefly outlined.
This document discusses data compression techniques for digital images. It explains that compression reduces the amount of data needed to represent an image by removing redundant information. The compression process involves an encoder that transforms the input image, and a decoder that reconstructs the output image. The encoder uses three main stages: a mapper to reduce interpixel redundancy, a quantizer to reduce accuracy and psychovisual redundancy, and a symbol encoder to assign variable-length codes to the quantized values. The decoder performs the inverse operations of the encoder and mapper to reconstruct the original image, but does not perform the inverse of quantization which is a lossy process.
This document discusses image compression techniques. It begins by explaining the goals of image compression which are to reduce storage requirements and increase transmission rates by reducing the amount of data needed to represent a digital image. It then describes lossless and lossy compression approaches, noting that lossy approaches allow for higher compression ratios but are not information preserving. The document goes on to explain various compression methods including transforms like DCT that reduce interpixel redundancy, quantization, entropy encoding, and standards like JPEG that use these techniques.
Oblivious Neural Network Predictions via MiniONN TransformationsSherif Abdelfattah
This document summarizes the Oblivious Neural Network Predictions via MiniONN Transformations paper.
1) MiniONN is a technique that allows a server to perform predictions using a neural network model on a client's private input, while revealing no information about the input or model. It uses secret sharing and oblivious computation to perform predictions without privacy violations.
2) MiniONN works by having the client and server secretly share the client's input between them. Oblivious linear transformations and activation functions are then computed to produce the prediction, without either party learning the other's data.
3) Experiments show MiniONN can perform predictions on common models like CNNs and LSTMs with low
Run-length encoding is a data compression technique that works by eliminating redundant data. It identifies repeating characters or values and replaces them with a code consisting of the character and the number of repeats. This compressed encoded data is then transmitted. At the receiving end, the code is decoded to reconstruct the original data. It is useful for compressing any type of repeating data sequences and is commonly used in image compression by encoding runs of black or white pixels. The compression ratio achieved depends on the amount of repetition in the original uncompressed data.
JPEG compression involves four key steps:
1) Applying the discrete cosine transform (DCT) to 8x8 pixel blocks, transforming spatial information to frequency information.
2) Quantizing the transformed coefficients, discarding less important high-frequency information to reduce file size.
3) Scanning coefficients in zigzag order to group similar frequencies together, further compressing the data.
4) Entropy encoding the output, typically using Huffman coding, to remove statistical redundancy and achieve further compression.
FPGA based Real-time Automatic Number Plate Recognition System for Modern Lic...IJERA Editor
This paper proposes a real-time number plate recognition technique which involves localizing the number plate from a rear view image of a vehicle, processing it using image processing and image enhancement techniques to segment and extract the characters in the number plate which are in turn matched against a set of stored templates for an accurate character recognition process. The entire system is developed on a FPGA to achieve real-time processing.
The network layer is responsible for transporting data segments from source to destination hosts. It encapsulates segments into datagrams and delivers them to the transport layer. Network layer protocols run on every host and router. Routers examine header fields to forward datagrams appropriately based on destination addresses. The network layer handles addressing, routing, and intermediate forwarding of datagrams between source and destination hosts.
This document summarizes a research paper that proposes a fractal image compression technique using fixed levels of scaling to reduce the encoding time. Fractal image compression works by partitioning an image into blocks and finding similar blocks elsewhere in the image to encode self-similarities. Typically, the scaling parameter is scanned through a range of values to find the best match, but this increases encoding time. The proposed technique uses four predefined fixed scaling values (0.45, 0.60, 0.82, 0.96) instead of scanning to reduce encoding time. An algorithm is presented and implemented in Matlab to test the technique on standard images. Experimental results showed the fixed scaling levels approach can speed up the encoding process for fractal image compression
The document discusses various image compression techniques including:
1) Variable length coding such as Huffman coding which reduces redundancy but is not optimal for the sample image due to inter-pixel redundancy.
2) Predictive coding which encodes pixel differences to remove redundancy, achieving higher compression ratios.
3) Lossy techniques like JPEG use quantization and discrete cosine transform to compress images further, introducing some distortion.
This document provides an overview of image compression techniques. It discusses how image compression works to reduce the number of bits needed to represent image data. The main goals of image compression are to reduce irrelevant and redundant image information to produce smaller and more efficient file sizes for storage and transmission. The document outlines different compression methods including lossless compression, which compresses data without any loss, and lossy compression, which allows for some loss of information in exchange for higher compression ratios. Specific techniques like run length encoding are also explained.
Lossless compression is a data compression technique that reduces the size of a file without sacrificing any original data. It allows for an exact duplicate of the original file to be recreated. Common lossless compression techniques include run-length encoding and the Burrows-Wheeler transform. Run-length encoding replaces runs of identical characters with the character and number of repeats. The Burrows-Wheeler transform rearranges data to group similar characters together in order to compress more efficiently with run-length encoding.
Image compression uses four stages to reduce file sizes: 1) transforming RGB pixels to the YCbCr color space, 2) applying discrete cosine transformation to concentrate pixel data into a few matrix elements, 3) quantizing pixel values to reduce their range, and 4) using Huffman coding to assign shorter bit codes to more common pixel values. This allows JPEG images to be compressed to smaller file sizes for storage and transmission while still maintaining good visual quality.
This document discusses predictive coding, which achieves data compression by predicting pixel values and encoding only prediction errors. It describes lossless predictive coding, which exactly reconstructs data, and lossy predictive coding, which introduces errors. Lossy predictive coding inserts quantization after prediction error calculation, mapping errors to a limited range to control compression and distortion. Common predictive coding techniques include linear prediction of pixels from neighboring values and delta modulation.
Design of QSD Number System Addition using Delayed Addition TechniqueKumar Goud
Abstract: Quaternary number system is a base-4 numeral system. Using Quaternary Signed Digit (QSD) number system may also execute carry free addition, borrow free subtraction and multiplication. The QSD number system wants a different group of prime modulo based logic elements for each arithmetic operation. In this work we extend this QSD addition to Delayed addition in place of carry free addition. Carry free addition generates intermediate carry and intermediate sum, in this carry propagation is required to generate intermediate sum. To reduce carry propagation we evaluated delayed addition. This delayed addition reduces carry propagation and improves arithmetic calculations. We present both QSD and Floating –point single precision addition using delayed addition. The design work is carried by using Verilog HDL in ISE.
Keywords: QSD, DA, CFA and Floating-Point.
Transform coding is a lossy compression technique that converts data like images and videos into an alternate form that is more convenient for compression purposes. It does this through a transformation process followed by coding. The transformation removes redundancy from the data by converting pixels into coefficients, lowering the number of bits needed to store them. For example, an array of 4 pixels requiring 32 bits to store originally might only need 20 bits after transformation. Transform coding is generally used for natural data like audio and images, removes redundancy, lowers bandwidth, and can form images with fewer colors. JPEG is an example of transform coding.
The document discusses various techniques for image compression, including lossless and lossy methods. For lossless compression, it describes predictive coding techniques that remove inter-pixel redundancy such as delta modulation. It also covers entropy encoding schemes like Huffman coding and LZW coding. For lossy compression, it discusses the discrete cosine transform used in the JPEG standard, where higher frequency coefficients are quantized more coarsely to remove information. Zig-zag ordering is used before entropy coding the quantized DCT coefficients.
The document discusses placing and rotating objects in PSTricks. It describes how to use the \rput command to place PSTricks objects and text at specified coordinates, and optionally rotate them. \rput defines a new coordinate system relative to the point of placement, allowing objects defined using different coordinate systems to be combined. Examples are provided to illustrate placing and rotating polygons and text.
This document discusses reproducible research with RStudio and knitr. It introduces literate programming with knitr, which allows code chunks to be embedded within LaTeX documents. RStudio provides a convenient graphical user interface for knitr by compiling documents with a single button click. The document provides examples of embedding R code and graphics within LaTeX and discusses various knitr chunk options for controlling code evaluation and output.
This document summarizes research on optimizing the LZ77 data compression algorithm. The researchers present a method to improve LZ77 compression by using variable triplet sizes instead of fixed sizes. Specifically, when the offset is equal to the match length, they represent it with a "doublet" of just length and next symbol, saving bits compared to the standard triplet representation. They show this optimization achieves higher compression ratios than the conventional LZ77 algorithm in experiments. The decoding process is made slightly more complex to identify doublets versus triplets but still allows decompressing the encoded data back to the original.
I am Boris M. I am a Computer Science Assignment Help Expert at programminghomeworkhelp.com. I hold MSc. in Programming, McGill University, Canada. I have been helping students with their homework for the past 7 years. I solve assignments related to Computer Science.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Computer Science assignments.
The document provides information on various techniques for image compression, including lossless and lossy compression methods. For lossless compression, it describes run-length encoding, entropy coding, and area coding. For lossy compression it discusses reducing the color space, chroma subsampling, and transform coding using DCT and wavelets. It also covers segmentation/approximation methods, spline interpolation, fractal coding, and bit allocation techniques for optimal compression.
This document provides an overview of common image compression techniques. It discusses why images are compressed, how compression reduces redundancy in images, and the general flow of image compression systems. It describes lossy compression methods like discrete cosine transform and discrete wavelet transform that reduce pixel correlation. Lossless compression techniques including quantization, Huffman coding, arithmetic coding and run length coding are also covered. Popular image compression algorithms like JPEG, JPEG 2000 and shape-adaptive compression are briefly outlined.
This document discusses data compression techniques for digital images. It explains that compression reduces the amount of data needed to represent an image by removing redundant information. The compression process involves an encoder that transforms the input image, and a decoder that reconstructs the output image. The encoder uses three main stages: a mapper to reduce interpixel redundancy, a quantizer to reduce accuracy and psychovisual redundancy, and a symbol encoder to assign variable-length codes to the quantized values. The decoder performs the inverse operations of the encoder and mapper to reconstruct the original image, but does not perform the inverse of quantization which is a lossy process.
This document discusses image compression techniques. It begins by explaining the goals of image compression which are to reduce storage requirements and increase transmission rates by reducing the amount of data needed to represent a digital image. It then describes lossless and lossy compression approaches, noting that lossy approaches allow for higher compression ratios but are not information preserving. The document goes on to explain various compression methods including transforms like DCT that reduce interpixel redundancy, quantization, entropy encoding, and standards like JPEG that use these techniques.
Oblivious Neural Network Predictions via MiniONN TransformationsSherif Abdelfattah
This document summarizes the Oblivious Neural Network Predictions via MiniONN Transformations paper.
1) MiniONN is a technique that allows a server to perform predictions using a neural network model on a client's private input, while revealing no information about the input or model. It uses secret sharing and oblivious computation to perform predictions without privacy violations.
2) MiniONN works by having the client and server secretly share the client's input between them. Oblivious linear transformations and activation functions are then computed to produce the prediction, without either party learning the other's data.
3) Experiments show MiniONN can perform predictions on common models like CNNs and LSTMs with low
Run-length encoding is a data compression technique that works by eliminating redundant data. It identifies repeating characters or values and replaces them with a code consisting of the character and the number of repeats. This compressed encoded data is then transmitted. At the receiving end, the code is decoded to reconstruct the original data. It is useful for compressing any type of repeating data sequences and is commonly used in image compression by encoding runs of black or white pixels. The compression ratio achieved depends on the amount of repetition in the original uncompressed data.
JPEG compression involves four key steps:
1) Applying the discrete cosine transform (DCT) to 8x8 pixel blocks, transforming spatial information to frequency information.
2) Quantizing the transformed coefficients, discarding less important high-frequency information to reduce file size.
3) Scanning coefficients in zigzag order to group similar frequencies together, further compressing the data.
4) Entropy encoding the output, typically using Huffman coding, to remove statistical redundancy and achieve further compression.
FPGA based Real-time Automatic Number Plate Recognition System for Modern Lic...IJERA Editor
This paper proposes a real-time number plate recognition technique which involves localizing the number plate from a rear view image of a vehicle, processing it using image processing and image enhancement techniques to segment and extract the characters in the number plate which are in turn matched against a set of stored templates for an accurate character recognition process. The entire system is developed on a FPGA to achieve real-time processing.
The network layer is responsible for transporting data segments from source to destination hosts. It encapsulates segments into datagrams and delivers them to the transport layer. Network layer protocols run on every host and router. Routers examine header fields to forward datagrams appropriately based on destination addresses. The network layer handles addressing, routing, and intermediate forwarding of datagrams between source and destination hosts.
This document summarizes a research paper that proposes a fractal image compression technique using fixed levels of scaling to reduce the encoding time. Fractal image compression works by partitioning an image into blocks and finding similar blocks elsewhere in the image to encode self-similarities. Typically, the scaling parameter is scanned through a range of values to find the best match, but this increases encoding time. The proposed technique uses four predefined fixed scaling values (0.45, 0.60, 0.82, 0.96) instead of scanning to reduce encoding time. An algorithm is presented and implemented in Matlab to test the technique on standard images. Experimental results showed the fixed scaling levels approach can speed up the encoding process for fractal image compression
The document discusses various image compression techniques including:
1) Variable length coding such as Huffman coding which reduces redundancy but is not optimal for the sample image due to inter-pixel redundancy.
2) Predictive coding which encodes pixel differences to remove redundancy, achieving higher compression ratios.
3) Lossy techniques like JPEG use quantization and discrete cosine transform to compress images further, introducing some distortion.
This document provides an overview of image compression techniques. It discusses how image compression works to reduce the number of bits needed to represent image data. The main goals of image compression are to reduce irrelevant and redundant image information to produce smaller and more efficient file sizes for storage and transmission. The document outlines different compression methods including lossless compression, which compresses data without any loss, and lossy compression, which allows for some loss of information in exchange for higher compression ratios. Specific techniques like run length encoding are also explained.
Lossless compression is a data compression technique that reduces the size of a file without sacrificing any original data. It allows for an exact duplicate of the original file to be recreated. Common lossless compression techniques include run-length encoding and the Burrows-Wheeler transform. Run-length encoding replaces runs of identical characters with the character and number of repeats. The Burrows-Wheeler transform rearranges data to group similar characters together in order to compress more efficiently with run-length encoding.
Image compression uses four stages to reduce file sizes: 1) transforming RGB pixels to the YCbCr color space, 2) applying discrete cosine transformation to concentrate pixel data into a few matrix elements, 3) quantizing pixel values to reduce their range, and 4) using Huffman coding to assign shorter bit codes to more common pixel values. This allows JPEG images to be compressed to smaller file sizes for storage and transmission while still maintaining good visual quality.
This document discusses predictive coding, which achieves data compression by predicting pixel values and encoding only prediction errors. It describes lossless predictive coding, which exactly reconstructs data, and lossy predictive coding, which introduces errors. Lossy predictive coding inserts quantization after prediction error calculation, mapping errors to a limited range to control compression and distortion. Common predictive coding techniques include linear prediction of pixels from neighboring values and delta modulation.
Design of QSD Number System Addition using Delayed Addition TechniqueKumar Goud
Abstract: Quaternary number system is a base-4 numeral system. Using Quaternary Signed Digit (QSD) number system may also execute carry free addition, borrow free subtraction and multiplication. The QSD number system wants a different group of prime modulo based logic elements for each arithmetic operation. In this work we extend this QSD addition to Delayed addition in place of carry free addition. Carry free addition generates intermediate carry and intermediate sum, in this carry propagation is required to generate intermediate sum. To reduce carry propagation we evaluated delayed addition. This delayed addition reduces carry propagation and improves arithmetic calculations. We present both QSD and Floating –point single precision addition using delayed addition. The design work is carried by using Verilog HDL in ISE.
Keywords: QSD, DA, CFA and Floating-Point.
Transform coding is a lossy compression technique that converts data like images and videos into an alternate form that is more convenient for compression purposes. It does this through a transformation process followed by coding. The transformation removes redundancy from the data by converting pixels into coefficients, lowering the number of bits needed to store them. For example, an array of 4 pixels requiring 32 bits to store originally might only need 20 bits after transformation. Transform coding is generally used for natural data like audio and images, removes redundancy, lowers bandwidth, and can form images with fewer colors. JPEG is an example of transform coding.
The document discusses various techniques for image compression, including lossless and lossy methods. For lossless compression, it describes predictive coding techniques that remove inter-pixel redundancy such as delta modulation. It also covers entropy encoding schemes like Huffman coding and LZW coding. For lossy compression, it discusses the discrete cosine transform used in the JPEG standard, where higher frequency coefficients are quantized more coarsely to remove information. Zig-zag ordering is used before entropy coding the quantized DCT coefficients.
The document discusses placing and rotating objects in PSTricks. It describes how to use the \rput command to place PSTricks objects and text at specified coordinates, and optionally rotate them. \rput defines a new coordinate system relative to the point of placement, allowing objects defined using different coordinate systems to be combined. Examples are provided to illustrate placing and rotating polygons and text.
This document discusses reproducible research with RStudio and knitr. It introduces literate programming with knitr, which allows code chunks to be embedded within LaTeX documents. RStudio provides a convenient graphical user interface for knitr by compiling documents with a single button click. The document provides examples of embedding R code and graphics within LaTeX and discusses various knitr chunk options for controlling code evaluation and output.
GSP 215 Effective Communication - tutorialrank.comBartholomew35
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
• Using Google, research the use of parallelism and concurrency in video gaming today. Describe how each
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows,
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...JinTaek Seo
Direct3D has evolved over many versions to support more advanced graphics capabilities. Early versions supported basic 3D rendering while later versions like DirectX 8 introduced pixel and vertex shaders, point sprites, and 3D textures. DirectX 9 improved shaders and added multiple render targets. DirectX 10 unified the shader pipeline and DirectX 11 added tessellation and support for GPGPU programming. Each version expanded the set of graphics techniques supported in hardware-accelerated 3D graphics.
Computer graphics uses programming and algorithms to draw pictures on screens. It involves computations to create and manipulate images. Common applications include GUIs, presentations, maps, medical imaging, engineering drawings, and entertainment like animation. Algorithms are used to generate basic shapes like lines, circles, and polygons. Line drawing algorithms include DDA, Bresenham's line algorithm, and the midpoint line algorithm. Circle generation uses Bresenham's or the midpoint circle algorithm. Polygon filling determines border versus interior pixels using techniques like the scan line or flood fill algorithms. Computer animation plays back recorded images fast enough to fool the eye into seeing motion. Traditional animation uses keyframing where keyframes define object changes and computers generate in-between frames. The
This fast-paced session starts with an introduction to neural networks and linear regression models, along with a quick view of TensorFlow, followed by some Scala APIs for TensorFlow. You'll also see a simple dockerized image of Scala and TensorFlow code and how to execute the code in that image from the command line. No prior knowledge of NNs, Keras, or TensorFlow is required (but you must be comfortable with Scala).
The document is a lab manual for a course on Computer Graphics and Multimedia. It contains:
1. A table of contents listing various sections like the time table, university scheme, syllabus, list of books, and list of programs.
2. The time table, university scheme, and syllabus provide details about the course schedule, assessment scheme, and topics to be covered.
3. The list of books and list of programs provide resources for students to refer to for the course and experiments to be performed in the lab.
Finding the shortest path in a graph and its visualization using C# and WPF IJECEIAES
This document summarizes a study that implemented Dijkstra's algorithm to find the shortest path between two vertices in an undirected graph using C# and WPF. It describes Dijkstra's algorithm and how it was programmed using .NET 4.0, Visual Studio 2010, and WPF. The program allows drawing graphs, finding the shortest path between two vertices by highlighting the path, and displaying the path length. Screenshots show example outputs of the program finding shortest paths in sample graphs.
The document discusses computer graphics concepts including pixels, colors, shapes, text, and programming. It covers:
1) Pixels are the smallest controllable elements that make up a digital image. Each pixel has a location and color value.
2) Colors are used for backgrounds and foregrounds. There are predefined color codes for text and graphics.
3) Basic shapes include lines, rectangles, circles, ellipses, polygons, and pie slices. Functions like line(), rectangle(), and circle() are used to draw shapes.
4) Text functions allow setting font, size, color, and position in graphics mode. Outtext() displays text.
5) Example programs demonstrate drawing shapes and text
Programming python quick intro for schoolsDan Bowen
This document provides an introduction to computing and programming concepts such as what a computer program is, binary and machine code, assembly code, interpreters and compilers, structured programs using sequences, branches, loops and modules. It discusses programming concepts like variables, strings, arithmetic operations, conditional statements, loops, functions, modules and file input/output. The key points are that a computer program is a set of instructions, programming involves different levels of representation from binary to assembly to high-level languages, and programming uses basic constructs like sequences, branches, loops to structure programs.
The document discusses graphic standards for CAD systems. It covers the components of a CAD database including geometric entities and coordinate points. It emphasizes the need for standards to facilitate data exchange between CAD, analysis, and manufacturing software. Common standards discussed include GKS, PHIGS, DXF, IGES, and STEP files, which allow translation between different CAD packages using neutral file formats. Key geometric transformations like translation, rotation, and scaling are also summarized in the context of how they are used in CAD modeling and animation.
For more course tutorials visit
www.newtonhelp.com
Week 1 HomeworkCommand Line in Windows and Linux
Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
For more course tutorials visit
www.newtonhelp.com
Week 1 HomeworkCommand Line in Windows and Linux
Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based,
GSP 215 Become Exceptional/newtonhelp.combellflower148
For more course tutorials visit
www.newtonhelp.com
Week 1 HomeworkCommand Line in Windows and Linux
Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
This document provides information about assignments for GSP 215 including homework assignments and iLabs covering topics like the command line, binary representation, memory management, and optimizing program performance. It lists the assignments for weeks 1 through 7 including homework on the command line, binary representation, structs, machine code, memory leaks, and virtual memory. It also provides details and instructions for some of the homework assignments and iLabs.
The document discusses attention mechanisms and their implementation in TensorFlow. It begins with an overview of attention mechanisms and their use in neural machine translation. It then reviews the code implementation of an attention mechanism for neural machine translation from English to French using TensorFlow. Finally, it briefly discusses pointer networks, an attention mechanism variant, and code implementation of pointer networks for solving sorting problems.
Python is a general purpose programming language that can be used for both programming and scripting. It is an interpreted language, meaning code is executed line by line by the Python interpreter. Python code is written in plain text files with a .py extension. Key features of Python include being object-oriented, using indentation for code blocks rather than brackets, and having a large standard library. Python code can be used for tasks like system scripting, web development, data analysis, and more.
I am Thanasis F. I am a C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from Harvard University. I have been helping students with their homework for the past 5 years. I solve homework related to C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Homework.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
"Choosing proper type of scaling", Olena SyrotaFwdays
Imagine an IoT processing system that is already quite mature and production-ready and for which client coverage is growing and scaling and performance aspects are life and death questions. The system has Redis, MongoDB, and stream processing based on ksqldb. In this talk, firstly, we will analyze scaling approaches and then select the proper ones for our system.
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...Jason Yip
The typical problem in product engineering is not bad strategy, so much as “no strategy”. This leads to confusion, lack of motivation, and incoherent action. The next time you look for a strategy and find an empty space, instead of waiting for it to be filled, I will show you how to fill it in yourself. If you’re wrong, it forces a correction. If you’re right, it helps create focus. I’ll share how I’ve approached this in the past, both what works and lessons for what didn’t work so well.
What is an RPA CoE? Session 1 – CoE VisionDianaGray10
In the first session, we will review the organization's vision and how this has an impact on the COE Structure.
Topics covered:
• The role of a steering committee
• How do the organization’s priorities determine CoE Structure?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
The Microsoft 365 Migration Tutorial For Beginner.pptxoperationspcvita
This presentation will help you understand the power of Microsoft 365. However, we have mentioned every productivity app included in Office 365. Additionally, we have suggested the migration situation related to Office 365 and how we can help you.
You can also read: https://www.systoolsgroup.com/updates/office-365-tenant-to-tenant-migration-step-by-step-complete-guide/
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
AppSec PNW: Android and iOS Application Security with MobSFAjin Abraham
Mobile Security Framework - MobSF is a free and open source automated mobile application security testing environment designed to help security engineers, researchers, developers, and penetration testers to identify security vulnerabilities, malicious behaviours and privacy concerns in mobile applications using static and dynamic analysis. It supports all the popular mobile application binaries and source code formats built for Android and iOS devices. In addition to automated security assessment, it also offers an interactive testing environment to build and execute scenario based test/fuzz cases against the application.
This talk covers:
Using MobSF for static analysis of mobile applications.
Interactive dynamic security assessment of Android and iOS applications.
Solving Mobile app CTF challenges.
Reverse engineering and runtime analysis of Mobile malware.
How to shift left and integrate MobSF/mobsfscan SAST and DAST in your build pipeline.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/how-axelera-ai-uses-digital-compute-in-memory-to-deliver-fast-and-energy-efficient-computer-vision-a-presentation-from-axelera-ai/
Bram Verhoef, Head of Machine Learning at Axelera AI, presents the “How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-efficient Computer Vision” tutorial at the May 2024 Embedded Vision Summit.
As artificial intelligence inference transitions from cloud environments to edge locations, computer vision applications achieve heightened responsiveness, reliability and privacy. This migration, however, introduces the challenge of operating within the stringent confines of resource constraints typical at the edge, including small form factors, low energy budgets and diminished memory and computational capacities. Axelera AI addresses these challenges through an innovative approach of performing digital computations within memory itself. This technique facilitates the realization of high-performance, energy-efficient and cost-effective computer vision capabilities at the thin and thick edge, extending the frontier of what is achievable with current technologies.
In this presentation, Verhoef unveils his company’s pioneering chip technology and demonstrates its capacity to deliver exceptional frames-per-second performance across a range of standard computer vision networks typical of applications in security, surveillance and the industrial sector. This shows that advanced computer vision can be accessible and efficient, even at the very edge of our technological ecosystem.
Essentials of Automations: Exploring Attributes & Automation ParametersSafe Software
Building automations in FME Flow can save time, money, and help businesses scale by eliminating data silos and providing data to stakeholders in real-time. One essential component to orchestrating complex automations is the use of attributes & automation parameters (both formerly known as “keys”). In fact, it’s unlikely you’ll ever build an Automation without using these components, but what exactly are they?
Attributes & automation parameters enable the automation author to pass data values from one automation component to the next. During this webinar, our FME Flow Specialists will cover leveraging the three types of these output attributes & parameters in FME Flow: Event, Custom, and Automation. As a bonus, they’ll also be making use of the Split-Merge Block functionality.
You’ll leave this webinar with a better understanding of how to maximize the potential of automations by making use of attributes & automation parameters, with the ultimate goal of setting your enterprise integration workflows up on autopilot.
Essentials of Automations: Exploring Attributes & Automation Parameters
Chap1
1. Graphics with PSTricks
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
s
ss
scss
sccs
cci
ii
ici
ihhc
ihhci
hh
hh
pppp
pppp
aaa
aaaa
rrrrrrrra
GG
GGG
GGG
dddd
dddd
nnn
nnnn
aaaa
aaaa
XXXX
XXXX
TE
TET
TTEEE
TTETEE
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
2. Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
1. Graphics with PSTricks
A
LTEX has only limited drawing capabilities, while PostScript is a page description language which has a rich set of drawing commands; and there
are programs (such as dvips) which translate the dvi output to PostScript.
So, the natural question is whether one can include PostScript code in a TEX
source file itself for programs such as dvips to process after the TEX compilation? This is the idea behind the PSTricks package of Timothy van Zandt.
The beauty of it is one need not know PostScript to use it—the necessary
PostScript code can be generated by TEX macros defined in the package.
Simple Curves
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
3. Graphics with PSTricks
1.1. Getting the points
Getting the points
Drawing Dots
Any picture is drawn by stringing together appropriate points. How do we
specify the points we need? We’ve a method of specifying each point in
a plane using a pair of numbers, thanks to the 17th century French mathematicians Pierre de Fermat and Ren´ Descartes. The method is to fix a
e
pair of perpendicular lines (called axes) and label each point with the numbers representing its distance from these two points (called coordinates) as
shown in the figure below:
3 unit
Ends of Lines
Bent Lines and Polygons
Simple Curves
(3,2)
2 unit
(1.5,0.5)
Simple Lines
(0,0)
Note that the meeting point of the axes (called the origin) has coordinates
(0,0). In order to associate each pair of numbers with a unique point, we
make the convention that horizontal distances to the left of the origin and
vertical distances below the origin are negative as illustrated below:
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
4. Graphics with PSTricks
Getting the points
Drawing Dots
(3,2)
Simple Lines
Ends of Lines
(-2,1)
Bent Lines and Polygons
Simple Curves
(0,0)
(-1,-1)
(2,-2)
Another fact to note is that the coordinates of points depend on the
position of the axes chosen, so that the same point has different pairs of
coordinates with respect to different set of axes. This is illustrated in the
figure below, where the point which originally had coordinates (3,2) with
respect to the axes shown in gray has new coordinates (1,1) with respect to
new axes shown in black.
A
Online L TEX Tutorial
Part II – Graphics
(1,1)
(3,2)
(0,0)
(0,0)
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
5. Graphics with PSTricks
The PSTricks package uses coordinates to specify points to plot and then
various other commands to join them.
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
6. Graphics with PSTricks
1.2. Drawing Dots
Getting the points
Drawing Dots
Now let’s see how to draw pictures with PSTricks. The basic package to
use is pstricks and so we assume in all the codes given below that this
package has been loaded with the command usepackage{pstricks} in
the document preamble.
Let’s start with the simplest of graphical objects—a single dot. Type in
the code below in your document:
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
Look at this dot psdots(1,0)
and TEX compile the document. To produce the PostScript, you’ll have to
use the dvips program or any other dvi to PostScript translator available in
your system. With dvips, this done by the command
dvips filename -o
where filename is the name of your file without any extension (or with the
extension .dvi). This creates a PostScript file of the same name but with
the extension .ps which you can view using a PostScript previewer, such as
ghostview. It looks like this:
Look at this dot
Some explanations are in order. Evidently the command to draw a dot
is psdots followed by the coordinates of the point where the dot is to be
placed. But we know that the assignment of coordinates to points (and vice
versa) makes sense only after fixing the axes. So when we specify coordinates such as (0,1) as above, what are the axes used? By default, PSTricks
uses the current point in TEX as the origin and horizontal and vertical lines
through this point as the axes. Again, the default unit is 1 cm. Thus in the
above example, a point is drawn 1 cm. away from the letter t in dot. This is
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
7. Graphics with PSTricks
illustrated in the figure below, where the (invisible) axes are shown in gray.
Getting the points
Drawing Dots
Simple Lines
¡
1 cm.
Ends of Lines
(0,0) (1,0)
Look at this dot
Bent Lines and Polygons
Simple Curves
A single psdots command can be used to plot any number of points.
For example, the input
Look at these dots psdots(0,0)(2,0)(1,1)
produce the (PostScript) output
Look at these dots
Now suppose we try
A
Online L TEX Tutorial
Part II – Graphics
Look at these dots psdots(0,0)(2,0)(1,1) forming the vertices
(corners) of a triangle.
the output produced is
Look at these dotsforming the vertexes (corners) of a triangle.
What happened? Why were the dots overwritten? What happened actually is that TEX did not reserve any space for the picture (recall that the
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
8. Graphics with PSTricks
picture is drawn after the TEX compilation) and so the dots were drawn over
the text. (if you look closely, you can see that the dots are over the letters).
This brings up an important point to be kept in mind: most of the PSTricks
commands produce 0-dimensional boxes in TEX. So, we must ensure that TEX
leaves enough space for the pictures to be drawn, by enclosing the picture
in a TEX box of suitable size. PSTricks itself provides a convenient method
of doing this, in the form of the pspicture environment. See how we can
modify the previous example:
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
begin{pspicture}(-0.5,0)(2.5,1)
psdots(0,0)(2,0)(1,1)
end{pspicture}
¡
¡
¡
This gives the output
A
Online L TEX Tutorial
Part II – Graphics
Here the pairs (-0.5,0) and (2.5,1) are the coordinates of the bottom-left
and top-right corners of a box which encloses the picture as shown in the
figure below:
Look at these dots
(2.5,1)
(–0.5,0)
forming the vertexes of a triangle.
In fact, the first pair of coordinates is optional and defaults to (0,0). Thus
for example,
...
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
9. Graphics with PSTricks
begin{pspicture}(1,2)...end{pspicture}
Getting the points
Drawing Dots
Simple Lines
is equivalent to
Ends of Lines
begin{pspicture}(0,0)(1,2) ... end{pspicture}
Bent Lines and Polygons
Simple Curves
We can also ‘display’ the picture by
begin{pspicture}(-0.5,-0.5)(2.5,1.5)
psdots(0,0)(2,0)(1,1)
end{pspicture}
This produces
A
Online L TEX Tutorial
Part II – Graphics
Can you see why the second coordinate of the ‘box’ is changed to -0.5
and 1.5 from its values 0 and 1 in the previous example?
The dots we’ve been drawing so far are all circular and black. How about
square and white dots? Change the input of the previous example as follows:
Look at these dots
begin{center}
begin{pspicture}(-0.5,-0.5)(2.5,1.5)
psdots[dotstyle=square](0,0)(2,0)(1,1)
end{pspicture}
end{center}
forming the vertices of a triangle.
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
12. Graphics with PSTricks
1.3. Simple Lines
Getting the points
Drawing Dots
Let’s see how we draw lines next. The command is psline with the coordinates of the points to be joined. For example
Look at the line segment below
begin{center}
begin{pspicture}(0,0)(3.5,2.5)
psline(2,1)(3,2)
end{pspicture}
end{center}
equally slanted to the horizontal and the vertical.
gives
Look at the line segment below
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
A
Online L TEX Tutorial
Part II – Graphics
equally slanted to the horizontal and the vertical.
We can draw dashed or dotted lines using the linestyle parameter.
Thus
begin{pspicture}(0,0)(2,1)
psline(0,0)(2,0)
psline[linestyle=dashed](2,0)(1,1)
psline[linestyle=dotted](1,1)(0,0)
end{pspicture}
gives
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
13. Graphics with PSTricks
1
0
0
1
2
In this and many of the pictures below, we include a “coordinate grid” for
convenience of reference. It is not produced by the code given alongside.
In the dashed style, the length of the black and white segments is controlled by the parameter dash Thus dash=3pt 2pt produces dashed line
with black segments of length 3 pt. and white segments of length 2 pt. Thus
begin{center}
begin{pspicture}(-0.5,-0.5)(2.5,1.5)
psline[linestyle=dashed,dash=2pt 2pt]
(0,0)(2,0)
psline[linestyle=dashed,dash=2pt 5pt]
(2,0)(1,1)
psline[linestyle=dashed,dash=5pt 5pt]
(1,1)(0,0)
end{pspicture}
end{center}
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
A
Online L TEX Tutorial
Part II – Graphics
gives
1
0
0
1
2
The default value of dash is 5 pt 3 pt. Again, in the dotted style, the
distance between dots is controlled by the parameter dotsep whose default
value is 3 pt.
We can also alter the thickness of the lines by changing the value of
the parameter linewidth which has a default value of 0.8 pt. Look at the
example below:
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
15. Graphics with PSTricks
1.4. Ends of Lines
Getting the points
Drawing Dots
Lines can be provided with arrowheads. This is done by the arrows parameter
begin{center}
begin{pspicture}(0,-0.5)(2,2.5)
psline[arrows=-](0,0)(1,2)
psline[arrows=-](1,1)(2,1)
end{pspicture}
end{center}
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
produces
A
Online L TEX Tutorial
Part II – Graphics
Instead of arrowheads, lines can be made to terminate with circles, T-bars
and so on, using the parameter arrows. The available values of this parameter and the corresponding line terminators are given in the Table 1.1. We
can mix and match these terminators as values for the arrows parameter
such as *- or |-.
Certain terminators are clearly seen only for thick lines. For example
begin{pspicture}(-0.5,-0.5)(2.5,2.5)
psline[linewidth=0.1cm,arrows=|-|]
(1,0)(1,2)
psline[linewidth=0.1cm,arrows=|*-|*]
(2,0)(2,2)
end{pspicture}
gives
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
16. Graphics with PSTricks
value
-
example
name
none
-
arrowheads
-
reverse arrowheads
-
double arrowheads
-
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
double reverse arrowheads
|-|
|*-|*
T-bars, flush with end points
T-bars, centered on end points
[-]
square brackets
(-)
rounded brackets
o-o
circles, centered on end points
*-*
disks, centered on end points
**-**
disks, flush to endpoints
c-c
extended, rounded ends
cc-cc
C-C
A
Online L TEX Tutorial
Part II – Graphics
flush round ends
extended, square ends
Table 1.1: Line terminators
To see some other terminators clearly, thicker lines are needed. Thus
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
17. Graphics with PSTricks
begin{pspicture}(-0.5,-0.5)(3.5,2.5)
psline[linewidth=0.5cm](0,0)(0,2)
psline[linewidth=0.5cm,arrows=c-c]
(1,0)(1,2)
psline[linewidth=0.5cm,arrows=cc-cc]
(2,0)(2,2)
psline[linewidth=0.5cm,arrows=C-C]
(3,0)(3,2)
end{pspicture}
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
gives
A
Online L TEX Tutorial
The arrows parameter can also be specified as an optional argument
within braces after the other options (in square brackets). Thus instead of
Part II – Graphics
psline[linestyle=dotted,arrows=-](0,0)(2,0)
we can also write
psline[linestyle=dotted]{-}(0,0)(2,0)
Now is the time to talk of (no, not cabbages and kings) the size of dots.
The diameter of a circular dot is 2.5 times the current linewidth plus .5 pt.
This can be changed by the parameter dotsize. Thus for example
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
18. Graphics with PSTricks
begin{center}
begin{pspicture}(0,0)(2,2)
psdot[linewidth=0.1cm,dotsize=1cm 10](1,1)
end{pspicture}
end{center}
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
gives
which is a circular disk of diameters 10 × 0.1 + 1 = 2 centimeters. (We’ll
soon see better method of drawing such disks). The polygonal dots are
sized to have the same area as circles. The dotsize is made to depend on
linewidth since dots are often used in conjunction with lines as in arrows
(and showpoints which we will discuss later). Note that the dotsize can be
set to any absolute value independent of the linewidth by setting the second
number of the dotsize parameter to 0.
There are parameters determining the dimensions of the other types of
line terminators also, which are given in Table 1.2. In this, width refers to a
dimension perpendicular to the line and length refers to a dimension in the
direction of the line.
The example below illustrates the use of some of these parameters
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
19. Graphics with PSTricks
parameter
value
description
default
value
dotsize = dim num
num × linewidth + dim
the diameter
of a circle or
disc
0.5 pt 5
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
tbarsize = dim num
num × linewidth + dim
the width of a
T-bar, square
bracket
or
round bracket
bracketlength = num
number × width
the
length
of a square
bracket
0.15
rbracketlength = num
number × width
the length of a
round bracket
0.15
2 pt 5
Simple Curves
Table 1.2: Parameters for line terminators
A
Online L TEX Tutorial
begin{center}
begin{pspicture}(-1,-1)(9,4)
psline[tbarsize=1cm 0,bracketlength=0.5]{[-|}(0,0)(3,0)
psline[tbarsize=1cm 0]{[-|}(0,3)(3,3)
psline[tbarsize=1cm 0,rbracketlength=0.5]{(-|}(5,0)(8,0)
psline[tbarsize=1cm 0]{(-|}(5,3)(8,3)
end{pspicture}
end{center}
Part II – Graphics
which produces the output below.
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
20. Graphics with PSTricks
Getting the points
4
Drawing Dots
Simple Lines
3
Ends of Lines
2
Bent Lines and Polygons
Simple Curves
1
0
-1
-1
0
1
2
3
4
5
6
7
8
9
Note that the coordinate grid in the picture above is not produced by the
given code.
The shape of arrowheads is determined by its length, width and inset
and the parameters controlling them are arrowsize, arrowlength and
arrowinset as shown in the figure below:
A
Online L TEX Tutorial
Part II – Graphics
length
width
inset
arrowsize = dim num
width = num × linewidth + dim
length = arrowlength × width
inset = arrowinset × length
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
21. Graphics with PSTricks
Getting the points
The default values of the parameters are
arrowsize = 2 pt 3 arrowlength = 1.4
arrowinset = 0.4
The example below illustrates the effect of changing these parameters.
begin{center}
begin{pspicture}(0.5,0.5)(5.5,4.5)
psline[linewidth=2pt,
arrowsize=2pt 2,
arrowlength=5,
arrowinset=0.1]
{-}(1,1)(4,4)
psline[linewidth=2pt]
{-}(2,1)(5,4)
end{pspicture}
end{center}
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
A
Online L TEX Tutorial
Part II – Graphics
We can also draw “double lines” by setting the parameter doubleline to
true (by default, it’s false). For example
begin{center}
begin{pspicture}(-0.5,-0.5)(2.5,2.5)
psline[linewidth=0.06,
doubleline=true,
doublesep=0.05,
(0,0)(2,2)
end{pspicture}
end{center}
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
22. Graphics with PSTricks
Getting the points
gives
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
23. Graphics with PSTricks
1.5. Bent Lines and Polygons
Getting the points
Drawing Dots
As in the case of psdots we can draw multiple lines with a single psline
command. For example,
Simple Lines
Ends of Lines
Bent Lines and Polygons
begin{center}
begin{pspicture}(0,0)(5,2)
psline(1,1)(2,2)(3,1)(4,2)(5,1)
end{pspicture}
end{center}
Simple Curves
gives
2
1
A
Online L TEX Tutorial
0
0
1
2
3
4
5
Note that the coordinate grid is not produced by the code given alongside.
The corners in the above picture can be rounded by giving a positive
value to the linearc parameter which has default value 0 pt. It is actually
the radius of the arc drawn at the corners. Thus
begin{center}
begin{pspicture}(0,0)(5,2)
psline[linearc=0.25]%
(1,1)(2,2)(3,1)(4,2)(5,1)
end{pspicture}
end{center}
gives
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
24. Graphics with PSTricks
2
1
0
0
1
2
3
4
5
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
Now change the value of linearc to 0.5 in the above code and see what
happens.
Polygons can be drawn with psline by taking the first and the last
points same. For example
begin{center}
begin{pspicture}(0,0)(5,3)
psline(1,1)(2,2)(5,2)(4,1)(1,1)
end{pspicture}
end{center}
A
Online L TEX Tutorial
Part II – Graphics
gives
2
1
0
0
1
2
3
4
5
We can also use the command pspolygon to draw polygons. Here, we
need not repeat the starting point as in psline. Thus in the last example
above, the parallelogram could also be drawn by the command
pspolygon(1,1)(2,2)(5,2)(4,1)
instead of the command
psline(1,1)(2,2)(5,2)(4,1)(1,1)
The pspolygon command also has a “starred” version which draws a
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
25. Graphics with PSTricks
“filled up” polygon. For example
begin{center}
begin{pspicture}(0,0)(5,3)
pspolygon*(1,1)(2,2)(5,2)(4,1)
end{pspicture}
end{center}
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
gives
For drawing rectangles, there’s a simpler command psframe in which
we need only specify the bottom-left and top-right coordinates. There’s also
a psframe* command for a filled-up version. For example,
begin{center}
begin{pspicture}(0,0)(6,4)
psframe(1,1)(3,3)
psframe*(1,1)(2,2)
psframe*(2,2)(3,3)
end{pspicture}
end{center}
A
Online L TEX Tutorial
Part II – Graphics
gives
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The corners of a frame can also be rounded. The parameter to set is
framearc. If we set framearc=number, then the radius of the rounded corners is half the number times the width or height of the frame, whichever
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
26. Graphics with PSTricks
is less. Thus
Getting the points
Drawing Dots
begin{center}
begin{pspicture}(-0.5,0.5)(5.5,3.5)
psframe[framearc=0.5](0,0)(5,3)
psframe[framearc=0.5](1,1)(4,2)
end{pspicture}
end{center}
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
gives
Note that the corners of the larger rectangle are more rounded, as should
be obvious from the definition of the framearc parameter. The radius of
the corners can be made he same by setting the parameter cornersize to
absolute (its default setting is relative) and then setting the radius using
the linearc parameter as in the example below:
begin{center}
begin{pspicture}(-0.5,-0.5)(5.5,3.5)
psframe[cornersize=absolute,%
linearc=0.5](0,0)(5,3)
psframe[cornersize=absolute,%
linearc=0.5](1,1)(4,2)
end{pspicture}
end{center}
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
27. Graphics with PSTricks
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
There are also commands to draw isoceles triangles (that is, triangles in
which two sides are equal) and rhombuses (diamonds). The command
Simple Curves
pstriangle((x, y)(b, h))
draws an isoceles triangle with its base horizontal, the mid-point of its base
at (x, y), length of base b and height h while the command
psdiamond((x, y)(d1 , d2 ))
draws a rhombus with its diagonals along the horizontal and the vertical,
which meet (x, y) and have lengths 2d1 and 2d2 . Thus
A
Online L TEX Tutorial
Part II – Graphics
begin{center}
begin{pspicture}(0,0)(5,5)
pstriangle(1,0)(2,3)
pstriangle*(4,1)(2,1.732)
psdiamond(3,4)(2,1)
end{pspicture}
end{center}
gives
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
28. Graphics with PSTricks
Getting the points
5
Drawing Dots
Simple Lines
4
Ends of Lines
3
Bent Lines and Polygons
Simple Curves
2
1
0
0
1
2
3
4
5
So far we’ve been drawing only straight lines (except for smoothing some
corners). We’ll discuss curves in the next few sections.
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
29. Graphics with PSTricks
1.6. Simple Curves
Getting the points
Drawing Dots
Circles, ellipses, circular arcs and so on can be easily drawn in PSTricks, using preset commands. Let’s start with circles. The command is pscircle
(what else?) and we’ve to specify the coordinates of the center and the
length of the radius. Recall that the default unit is centimeter, so that to
produce a circle of radius 0.5 cm centered at (2,1), we write
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
pscircle(2,1){0.5}
Since a circle is only a curved “line”, various line parameters discussed
earlier can also be used. There is also a starred version pscircle* which
gives a “solid” circle. See the example below:
begin{center}
begin{pspicture}(-1,-1)(3,8)
pscircle*(1,0.25){0.25}
pscircle[linewidth=0.33]%
(1,1){0.5}
pscircle[linewidth=0.25]%
(1,2.25){0.75}
pscircle(1,4){1}
pscircle[linestyle=dotted]%
(1,6.25){1.25}
end{pspicture}
end{center}
A
Online L TEX Tutorial
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
30. Graphics with PSTricks
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
Pieces of circles can also be easily drawn. For example, the command
psarc draws a circular arc of specified center and radius from a given
angle to another going counterclockwise. Note that the angles are measured
from the horizontal. In the example below, we show the radii and the angles
in gray along with the grid. (note that these are not produced by the given
code).
A
Online L TEX Tutorial
Part II – Graphics
begin{center}
begin{pspicture}(-1,-1)(3,3)
psarc(0,0){3}{30}{60}
end{pspicture}
end{center}
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
31. Graphics with PSTricks
Getting the points
3
Drawing Dots
Simple Lines
2
Ends of Lines
1
Bent Lines and Polygons
60◦
0
Simple Curves
30◦
-1
-1
0
1
2
3
There’s also a starred version psarc* which draws a solid “segment” of
a circle. For example,
begin{center}
begin{pspicture}(-2,-2)(2,2)
psframe(-1,-1)(1,1)
psarc*(-1,-1){1}{0}{90}
psarc*(1,-1){1}{90}{180}
psarc*(1,1){1}{180}{270}
psarc*(-1,1){1}{270}{360}
end{pspicture}
end{center}
A
Online L TEX Tutorial
Part II – Graphics
gives
2
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
1
0
-1
The Indian TEX Users Group
-2
-2
-1
0
1
2
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
32. Graphics with PSTricks
While making a picture containing circular arcs, it may sometimes be convenient to “see” the center and radii. If the parameter showpoints is set to
true (its default value is false), then the command psarc (or psarc)
draws dashed lines from the center to the extremities of the arc. (This setting can be used with other commands also, where it will draw appropriate
control points or lines). See the example below:
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
Simple Curves
begin{center}
begin{pspicture}(0,0)(3,3)
psarc[showpoints=true]%
(1,1){2}{30}{60}
end{pspicture}
end{center}
A
Online L TEX Tutorial
3
Part II – Graphics
2
1
0
0
1
2
3
If we want to draw an arc with its bounding radii, we can use the
pswedge command. The starred version pswedge* draws a solid sector
as shown in the example below:
begin{center}
begin{pspicture}(-1.5,-1.5)(1.5,1.5)
pswedge(0,0){1}{90}{360}
pswedge*(0.1,0.1){1}{0}{90}
end{pspicture}
end{center}
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
33. Graphics with PSTricks
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
The line terminators discussed earlier can be used with arcs also. If we
want to show the angle between two (thick) intersecting lines using an arc
with an arrowhead, we’d like to have the tip of the arrow would just touch
the line. For this, we can use the parameters arcsepA and arcsepB. If we
set arcsepA=dim, then the first angle in the psarc command would be
adjusted so that the arc would just touch a line of width dim from the
center of the arc in the direction of this angle. The parameter arcsepB
makes a similar adjustment in the second angle. The parameter arcsep
adjusts both the angles. The example below illustrates this.
Simple Curves
A
Online L TEX Tutorial
Part II – Graphics
begin{center}
begin{pspicture}(-2,0)(2,2)
psline[linewidth=2pt]%
(2,2)(0,0)(-2,2)
psarc[arcsepB=2pt]{-}%
(0,0){1}{45}{135}
end{pspicture}
end{center}
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
2
1
0
-2
-1
0
1
2
To see the difference, try the same code without the setting of arcsepB.
An ellipse is a sort of a stretched circle and can be drawn much the
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
34. Graphics with PSTricks
same way as s circle. The command is psellipse and we have to specify
the center and half the width and height (technically, the “semi-major” and
“semi-minor” axes). Thus to draw an ellipse centered at (1,1) with width
width 4 cm and height 2 cm, we type
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
begin{center}
begin{pspicture}(-1,0)(3,2)
psellipse(1,1)(2,1)
end{pspicture}
end{center}
Simple Curves
which gives
2
1
A
Online L TEX Tutorial
0
-1
0
1
2
3
There’s also a psellipse* which, as you’ve probably guessed, draws a
solid black ellipse.
begin{center}
begin{pspicture}(-2,-1)(2,1)
psellipse(0,0)(2,1)
psellipse*(0,0)(0.5,1)
end{pspicture}
end{center}
Part II – Graphics
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
1
0
The Indian TEX Users Group
-1
-2
-1
0
1
2
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in
35. Graphics with PSTricks
Another curve for which a preset command is available is a parabola
(the path of a stone thrown at an angle, for example). It is drawn by the
command parabola (surprise!). We must specify the starting point and
the maximum or minimum. As usual, we have a parabola* also. Thus
Getting the points
Drawing Dots
Simple Lines
Ends of Lines
Bent Lines and Polygons
begin{center}
begin{pspicture}(0,0)(4,2)
parabola(0,0)(2,2)
parabola*(1,1.5)(2,0)
end{pspicture}
end{center}
Simple Curves
gives
2
A
Online L TEX Tutorial
1
Part II – Graphics
0
0
1
2
3
4
c 2002, The Indian TEX Users Group
This document is generated by PDFTEX with
hyperref, pstricks, pdftricks and pdfscreen
packages in an intel PC running GNU / LINUX
and is released under LPPL
The Indian TEX Users Group
Floor iii, sjp Buildings, Cotton Hills
Trivandrum 695014, india
http://www.tug.org.in