Skip to content
TheChatArchiveThe Chat Archive
Qwenqwen-max-2025-01-25· Alibaba (Qwen)Hugging Face LMArena Human Preference 140K

TikZ drawing of a red tractor in 3d

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Coherecommand-a-03-2025’s answer.
  1. User

    TikZ drawing of a red tractor in 3d

  2. Qwen Assistant

    Creating a 3D red tractor using TikZ in LaTeX is a challenging but rewarding task. TikZ is primarily a 2D drawing package, but with some creativity and perspective tricks, we can simulate a 3D appearance. Below is an example of how you can draw a simple red tractor in a pseudo-3D style.

    Code for a Red Tractor in TikZ

    \documentclass[tikz,border=10pt]{standalone}
    \usetikzlibrary{3d,calc}
    
    \begin{document}
    
    \begin{tikzpicture}[scale=1.5, line join=round, line cap=round]
        % Define colors
        \definecolor{tractorred}{RGB}{200,0,0} % Red color for the tractor body
        \definecolor{wheelgray}{RGB}{80,80,80} % Gray color for the wheels
    
        % Draw the tractor body (main cabin)
        \fill[tractorred] (0,0) -- (2,0) -- (2.5,0.5) -- (0.5,0.5) -- cycle; % Bottom part
        \fill[tractorred] (0.5,0.5) -- (2.5,0.5) -- (2.5,1.5) -- (0.5,1.5) -- cycle; % Side wall
        \fill[tractorred] (0.5,1.5) -- (2.5,1.5) -- (2.0,2.0) -- (0,2.0) -- cycle; % Roof
    
        % Draw the engine hood
        \fill[tractorred] (2.5,0.5) -- (4,0.5) -- (4,1.5) -- (2.5,1.5) -- cycle;
    
        % Draw the front grille (rectangle on the engine hood)
        \fill[black] (3.0,0.7) rectangle (3.5,1.3);
    
        % Draw the windshield (angled rectangle)
        \fill[white] (1.0,1.0) -- (1.8,1.0) -- (1.6,1.5) -- (0.8,1.5) -- cycle;
    
        % Draw the front wheel
        \draw[fill=wheelgray] (3.5,0) circle (0.5);
        \draw[fill=black] (3.5,0) circle (0.1); % Hubcap
    
        % Draw the rear wheel
        \draw[fill=wheelgray] (1.0,0) circle (0.5);
        \draw[fill=black] (1.0,0) circle (0.1); % Hubcap
    
        % Add some details: exhaust pipe
        \draw[thick, black] (4.0,1.5) -- (4.5,1.8); % Exhaust pipe
        \fill[black] (4.5,1.8) circle (0.05); % Tip of the exhaust pipe
    
        % Add shadows or highlights (optional)
        \fill[black, opacity=0.2] (0.5,0.5) -- (2.5,0.5) -- (2.5,1.5) -- (0.5,1.5) -- cycle; % Shadow on side wall
        \fill[white, opacity=0.3] (0.5,1.5) -- (2.5,1.5) -- (2.0,2.0) -- (0,2.0) -- cycle; % Highlight on roof
    
        % Add ground line
        \draw[thick, gray] (-0.5,-0.5) -- (5,-0.5);
    \end{tikzpicture}
    
    \end{document}
    

    Explanation of the Code

    1. Colors:

      • The tractor body is filled with a custom red color (tractorred).
      • The wheels are filled with a dark gray color (wheelgray).
    2. Tractor Body:

      • The main cabin is drawn as a rectangular prism with a sloped roof.
      • The engine hood is a simple rectangular extension.
    3. Wheels:

      • Two circles represent the wheels, with smaller black circles for the hubcaps.
    4. Details:

      • A black rectangle represents the front grille.
      • A white trapezoid represents the windshield.
      • An exhaust pipe is added as a diagonal line with a small circle at the tip.
    5. Shadows and Highlights:

      • Shadows and highlights are added to give the tractor a more 3D appearance.
    6. Ground Line:

      • A gray horizontal line is drawn to represent the ground.

    Output

    When you compile this code using a LaTeX editor (e.g., Overleaf or TeXShop), you will see a simple red tractor with a pseudo-3D effect. The design is intentionally minimalistic to keep the code manageable while still conveying the essence of a tractor.

    Let me know if you'd like to enhance the design further!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.